@GwtCompatible(emulated=true) public class CollectionAddTester<E> extends AbstractCollectionTester<E>
add
operations on a collection. Can't be invoked
directly; please see CollectionTestSuiteBuilder
.AbstractContainerTester.ArrayWithDuplicate<E>
collection
container, samples
Constructor and Description |
---|
CollectionAddTester() |
Modifier and Type | Method and Description |
---|---|
static java.lang.reflect.Method |
getAddNullSupportedMethod()
Returns the
Method instance for testAdd_nullSupported() so that tests of
Collections.checkedCollection(java.util.Collection, Class) can suppress it
with FeatureSpecificTestSuiteBuilder.suppressing() until Sun bug 6409434 is fixed. |
static java.lang.reflect.Method |
getAddNullUnsupportedMethod()
Returns the
Method instance for testAdd_nullSupported() so that tests of
TreeSet can suppress it with FeatureSpecificTestSuiteBuilder.suppressing() until Sun bug 5045147 is fixed. |
static java.lang.reflect.Method |
getAddUnsupportedNotPresentMethod()
Returns the
Method instance for testAdd_unsupportedNotPresent() so that tests
can suppress it with FeatureSpecificTestSuiteBuilder.suppressing() while we figure out
what to do with ConcurrentHashMap support for entrySet().add() . |
void |
testAdd_nullSupported() |
void |
testAdd_nullUnsupported() |
void |
testAdd_supportedNotPresent() |
void |
testAdd_unsupportedNotPresent() |
void |
testAdd_unsupportedPresent() |
void |
testAddConcurrentWithIteration() |
actualContents, createArrayWithNullElement, expectNullMissingWhenNullUnsupported, initCollectionWithNullElement, resetCollection, resetContainer
createArrayWithDuplicateElement, createDisjointCollection, createOrderedArray, createSamplesArray, e0, e1, e2, e3, e4, emptyCollection, expectAdded, expectAdded, expectAdded, expectContents, expectContents, expectMissing, expectUnchanged, getNullLocation, getNumElements, getOrderedElements, getSampleElements, getSampleElements, resetContainer, setUp
getName, getSubjectGenerator, getTestMethodName, init, init, tearDown
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, run, run, runBare, runTest, setName, toString
public CollectionAddTester()
public void testAdd_supportedNotPresent()
public void testAdd_unsupportedNotPresent()
public void testAdd_unsupportedPresent()
public void testAdd_nullSupported()
public void testAdd_nullUnsupported()
public void testAddConcurrentWithIteration()
@GwtIncompatible public static java.lang.reflect.Method getAddNullSupportedMethod()
Method
instance for testAdd_nullSupported()
so that tests of
Collections.checkedCollection(java.util.Collection, Class)
can suppress it
with FeatureSpecificTestSuiteBuilder.suppressing()
until Sun bug 6409434 is fixed.
It's unclear whether nulls were to be permitted or forbidden, but presumably the eventual fix
will be to permit them, as it seems more likely that code would depend on that behavior than on
the other. Thus, we say the bug is in add(), which fails to support null.@GwtIncompatible public static java.lang.reflect.Method getAddNullUnsupportedMethod()
Method
instance for testAdd_nullSupported()
so that tests of
TreeSet
can suppress it with FeatureSpecificTestSuiteBuilder.suppressing()
until Sun bug 5045147 is fixed.@GwtIncompatible public static java.lang.reflect.Method getAddUnsupportedNotPresentMethod()
Method
instance for testAdd_unsupportedNotPresent()
so that tests
can suppress it with FeatureSpecificTestSuiteBuilder.suppressing()
while we figure out
what to do with ConcurrentHashMap
support for entrySet().add()
.Copyright © 2010-2018. All Rights Reserved.