Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for testCopyOf_collectionContainingNull (0.18 sec)

  1. android/guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java

        Multiset<String> multiset = ImmutableMultiset.copyOf(c);
        assertEquals(HashMultiset.create(asList("a", "b", "a")), multiset);
      }
    
      public void testCopyOf_collectionContainingNull() {
        Collection<@Nullable String> c = MinimalCollection.of("a", null, "b");
        assertThrows(
            NullPointerException.class, () -> ImmutableMultiset.copyOf((Collection<String>) c));
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 20.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java

        Set<String> set = copyOf(c);
        assertEquals(2, set.size());
        assertTrue(set.contains("a"));
        assertTrue(set.contains("b"));
      }
    
      public void testCopyOf_collectionContainingNull() {
        Collection<@Nullable String> c = MinimalCollection.of("a", null, "b");
        assertThrows(NullPointerException.class, () -> copyOf((Collection<String>) c));
      }
    
      enum TestEnum {
        A,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 18.4K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java

        Multiset<String> multiset = ImmutableMultiset.copyOf(c);
        assertEquals(HashMultiset.create(asList("a", "b", "a")), multiset);
      }
    
      public void testCopyOf_collectionContainingNull() {
        Collection<@Nullable String> c = MinimalCollection.of("a", null, "b");
        assertThrows(
            NullPointerException.class, () -> ImmutableMultiset.copyOf((Collection<String>) c));
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 24.8K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/ImmutableListTest.java

        List<String> mutableList = asList("a", "b");
        list = ImmutableList.copyOf(mutableList);
        mutableList.set(0, "c");
        assertEquals(asList("a", "b"), list);
      }
    
      public void testCopyOf_collectionContainingNull() {
        Collection<@Nullable String> c = MinimalCollection.of("a", null, "b");
        assertThrows(NullPointerException.class, () -> ImmutableList.copyOf((Collection<String>) c));
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 24.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/ImmutableListTest.java

        List<String> mutableList = asList("a", "b");
        list = ImmutableList.copyOf(mutableList);
        mutableList.set(0, "c");
        assertEquals(asList("a", "b"), list);
      }
    
      public void testCopyOf_collectionContainingNull() {
        Collection<@Nullable String> c = MinimalCollection.of("a", null, "b");
        assertThrows(NullPointerException.class, () -> ImmutableList.copyOf((Collection<String>) c));
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 23.6K bytes
    - Viewed (0)
Back to top