|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase com.google.common.collect.testing.AbstractTester<OneSizeTestContainerGenerator<C,E>> com.google.common.collect.testing.AbstractContainerTester<Collection<E>,E> com.google.common.collect.testing.AbstractCollectionTester<E> com.google.common.collect.testing.testers.CollectionToArrayTester<E>
public class CollectionToArrayTester<E>
A generic JUnit test which tests toArray()
operations on a
collection. Can't be invoked directly; please see
CollectionTestSuiteBuilder
.
This class is GWT compatible.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.common.collect.testing.AbstractContainerTester |
---|
AbstractContainerTester.ArrayWithDuplicate<E> |
Field Summary |
---|
Fields inherited from class com.google.common.collect.testing.AbstractCollectionTester |
---|
collection |
Fields inherited from class com.google.common.collect.testing.AbstractContainerTester |
---|
container, samples |
Constructor Summary | |
---|---|
CollectionToArrayTester()
|
Method Summary | |
---|---|
static Method |
getToArrayIsPlainObjectArrayMethod()
Returns the Method instance for
testToArray_isPlainObjectArray() so that tests of
Arrays.asList(Object[]) can suppress it with FeatureSpecificTestSuiteBuilder.suppressing() until Sun bug
6260652 is fixed. |
void |
testToArray_emptyArray_ordered()
|
void |
testToArray_emptyArray()
|
void |
testToArray_emptyArrayOfObject()
|
void |
testToArray_emptyArrayOfWrongTypeForEmptyCollection()
|
void |
testToArray_emptyArrayOfWrongTypeForNonEmptyCollection()
|
void |
testToArray_isPlainObjectArray()
Collection.toArray(Object[]) says: "Note that
toArray(new Object[0]) is identical in function to
toArray()." |
void |
testToArray_noArgs()
|
void |
testToArray_oversizedArray_ordered()
|
void |
testToArray_oversizedArray()
|
void |
testToArray_rightSizedArray_ordered()
|
void |
testToArray_rightSizedArray()
|
void |
testToArray_rightSizedArrayOfObject_ordered()
|
void |
testToArray_rightSizedArrayOfObject()
|
Methods inherited from class com.google.common.collect.testing.AbstractCollectionTester |
---|
actualContents, createArrayWithNullElement, expectNullMissingWhenNullUnsupported, initCollectionWithNullElement, resetCollection, resetContainer |
Methods inherited from class com.google.common.collect.testing.AbstractContainerTester |
---|
createArrayWithDuplicateElement, createDisjointCollection, createSamplesArray, emptyCollection, expectAdded, expectAdded, expectAdded, expectContents, expectContents, expectMissing, expectUnchanged, getNullLocation, getNumElements, getOrderedElements, getSampleElements, getSampleElements, resetContainer, setUp |
Methods inherited from class com.google.common.collect.testing.AbstractTester |
---|
getName, getSubjectGenerator, getTestMethodName, init, init, tearDown |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, run, run, runBare, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
---|
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, fail, fail, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CollectionToArrayTester()
Method Detail |
---|
public void testToArray_noArgs()
public void testToArray_isPlainObjectArray()
Collection.toArray(Object[])
says: "Note that
toArray(new Object[0]) is identical in function to
toArray()."
For maximum effect, the collection under test should be created from an
element array of a type other than Object[]
.
public void testToArray_emptyArray()
public void testToArray_emptyArray_ordered()
public void testToArray_emptyArrayOfObject()
public void testToArray_rightSizedArray()
public void testToArray_rightSizedArray_ordered()
public void testToArray_rightSizedArrayOfObject()
public void testToArray_rightSizedArrayOfObject_ordered()
public void testToArray_oversizedArray()
public void testToArray_oversizedArray_ordered()
public void testToArray_emptyArrayOfWrongTypeForNonEmptyCollection()
public void testToArray_emptyArrayOfWrongTypeForEmptyCollection()
public static Method getToArrayIsPlainObjectArrayMethod()
Method
instance for
testToArray_isPlainObjectArray()
so that tests of
Arrays.asList(Object[])
can suppress it with FeatureSpecificTestSuiteBuilder.suppressing()
until Sun bug
6260652 is fixed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |