@CollectionFeature.Require( value = {SUPPORTS_ADD, ALLOWS_NULL_VALUES}, absent = RESTRICTS_ELEMENTS ) public void testAddAll_nullSupported() { List<E> containsNull = singletonList(null); assertTrue("addAll(containsNull) should return true", collection.addAll(containsNull)); /* * We need (E) to force interpretation of null as the single element of a * varargs array, not the array itself */ expectAdded((E) null); }
@CollectionFeature.Require(SUPPORTS_ADD) public void testAddAll_supportedNonePresent() { assertTrue( "addAll(nonePresent) should return true", collection.addAll(createDisjointCollection())); expectAdded(e3(), e4()); }
@CollectionFeature.Require(value = {SUPPORTS_ADD, ALLOWS_NULL_VALUES}, absent = RESTRICTS_ELEMENTS) public void testAddAll_nullSupported() { List<E> containsNull = singletonList(null); assertTrue("addAll(containsNull) should return true", collection .addAll(containsNull)); /* * We need (E) to force interpretation of null as the single element of a * varargs array, not the array itself */ expectAdded((E) null); }
@CollectionFeature.Require( value = {SUPPORTS_ADD, ALLOWS_NULL_VALUES}, absent = RESTRICTS_ELEMENTS ) public void testAddAll_nullSupported() { List<E> containsNull = singletonList(null); assertTrue("addAll(containsNull) should return true", collection.addAll(containsNull)); /* * We need (E) to force interpretation of null as the single element of a * varargs array, not the array itself */ expectAdded((E) null); }
@CollectionFeature.Require(SUPPORTS_ADD) public void testAddAll_supportedNonePresent() { assertTrue("addAll(nonePresent) should return true", collection.addAll(createDisjointCollection())); expectAdded(samples.e3, samples.e4); }
@CollectionFeature.Require(SUPPORTS_ADD) public void testAddAll_supportedNonePresent() { assertTrue( "addAll(nonePresent) should return true", collection.addAll(createDisjointCollection())); expectAdded(e3(), e4()); }