Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,004 for Should (0.16 sec)

  1. guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java

        int index = aValidIndex();
        E initialValue = getList().get(index);
        assertEquals(
            "set(i, x) should return the old element at position i.",
            initialValue,
            getList().set(index, newValue));
        assertEquals("After set(i, x), get(i) should return x", newValue, getList().get(index));
        assertEquals("set() should not change the size of a list.", getNumElements(), getList().size());
      }
    
      @ListFeature.Require(SUPPORTS_SET)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/testers/ListAddAllAtIndexTester.java

          fail("addAll(n, allPresent) should throw");
        } catch (UnsupportedOperationException expected) {
        }
        expectUnchanged();
      }
    
      @ListFeature.Require(SUPPORTS_ADD_WITH_INDEX)
      @CollectionSize.Require(absent = ZERO)
      public void testAddAllAtIndex_supportedSomePresent() {
        assertTrue(
            "addAll(n, allPresent) should return true",
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/testers/MapPutTester.java

      public void testPut_supportedPresent() {
        assertEquals("put(present, value) should return the old value", v0(), getMap().put(k0(), v3()));
        expectReplacement(entry(k0(), v3()));
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
      public void testPut_supportedNotPresent() {
        assertNull("put(notPresent, value) should return null", put(e3()));
        expectAdded(e3());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionRemoveTester.java

      @CollectionSize.Require(absent = ZERO)
      public void testRemove_present() {
        int initialSize = collection.size();
        assertTrue("remove(present) should return true", collection.remove(e0()));
        assertEquals(
            "remove(present) should decrease a collection's size by one.",
            initialSize - 1,
            collection.size());
        expectMissing(e0());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/testers/CollectionRemoveAllTester.java

        assertFalse(
            "removeAll(emptyCollection) should return false",
            collection.removeAll(MinimalCollection.of()));
        expectUnchanged();
      }
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      public void testRemoveAll_nonePresent() {
        assertFalse(
            "removeAll(disjointCollection) should return false",
            collection.removeAll(MinimalCollection.of(e3())));
        expectUnchanged();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddAllTester.java

      @CollectionSize.Require(absent = ZERO)
      public void testAddAll_supportedSomePresent() {
        assertTrue(
            "addAll(somePresent) should return true",
            collection.addAll(MinimalCollection.of(e3(), e0())));
        assertTrue("should contain " + e3(), collection.contains(e3()));
        assertTrue("should contain " + e0(), collection.contains(e0()));
      }
    
      @CollectionFeature.Require(absent = SUPPORTS_ADD)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java

        try {
          iter.peek();
          fail("peek() should throw NoSuchElementException at end");
        } catch (NoSuchElementException expected) {
        }
    
        try {
          iter.peek();
          fail("peek() should continue to throw NoSuchElementException at end");
        } catch (NoSuchElementException expected) {
        }
    
        try {
          iter.next();
          fail("next() should throw NoSuchElementException as usual");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/testers/MapRemoveTester.java

      @CollectionSize.Require(absent = ZERO)
      public void testRemove_present() {
        int initialSize = getMap().size();
        assertEquals("remove(present) should return the associated value", v0(), getMap().remove(k0()));
        assertEquals(
            "remove(present) should decrease a map's size by one.", initialSize - 1, getMap().size());
        expectMissing(e0());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/testers/ListEqualsTester.java

        assertFalse(
            "A List should not equal another List containing different elements.",
            getList().equals(other));
      }
    
      @CollectionSize.Require(absent = CollectionSize.ZERO)
      public void testEquals_otherListContainingNull() {
        List<E> other = new ArrayList<>(getSampleElements());
        other.set(other.size() / 2, null);
        assertFalse(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 3.5K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/testers/ListEqualsTester.java

        assertFalse(
            "A List should not equal another List containing different elements.",
            getList().equals(other));
      }
    
      @CollectionSize.Require(absent = CollectionSize.ZERO)
      public void testEquals_otherListContainingNull() {
        List<E> other = new ArrayList<>(getSampleElements());
        other.set(other.size() / 2, null);
        assertFalse(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 3.5K bytes
    - Viewed (0)
Back to top