|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.commons.collections.BulkTest
org.apache.commons.collections.TestObject
org.apache.commons.collections.TestMap
org.apache.commons.collections.TestBeanMap
Test cases for BeanMap
| Nested Class Summary | |
static class |
TestBeanMap.BeanWithProperties |
| Nested classes inherited from class org.apache.commons.collections.TestMap |
TestMap.TestMapEntrySet, TestMap.TestMapKeySet, TestMap.TestMapValues |
| Field Summary | |
private java.lang.Object |
objectInFullMapAn object value that will be stored in the bean map as a value. |
| Fields inherited from class org.apache.commons.collections.TestMap |
confirmed, entrySet, keySet, map, values |
| Fields inherited from class org.apache.commons.collections.TestObject |
COLLECTIONS_MAJOR_VERSION |
| Fields inherited from class org.apache.commons.collections.BulkTest |
verboseName |
| Fields inherited from class junit.framework.TestCase |
|
| Constructor Summary | |
TestBeanMap(java.lang.String testName) |
|
| Method Summary | |
java.lang.Object[] |
getNewSampleValues()Returns a the set of values that can be used to replace the values returned from getSampleValues(). |
java.lang.Object[] |
getSampleKeys()Returns the set of keys in the mappings used to test the map. |
java.lang.Object[] |
getSampleValues()Returns the set of values in the mappings used to test the map. |
java.lang.String[] |
ignoredSimpleTests()Returns an array of simple test names to ignore. |
boolean |
isAddRemoveModifiable()The mappings in a BeanMap are fixed on the properties the underlying bean has. |
java.util.Map |
makeEmptyMap()Return a new, empty Map to be used for testing. |
java.util.Map |
makeFullMap()Return a new, populated map. |
static junit.framework.Test |
suite() |
void |
testBeanMapClone() |
void |
testBeanMapPutAllWriteable() |
void |
testClear()Need to override this method because the "clear()" method on the bean map just returns the bean properties to their default states. |
| Methods inherited from class org.apache.commons.collections.TestMap |
addSampleMappings, bulkTestMapEntrySet, bulkTestMapKeySet, bulkTestMapValues, getOtherKeys, getOtherValues, isChangeable, makeObject, resetEmpty, resetFull, tearDown, testEmptyMapCompatibility, testFullMapCompatibility, testMakeMap, testMapClear, testMapContainsKey, testMapContainsValue, testMapEquals, testMapGet, testMapHashCode, testMapIsEmpty, testMapPut, testMapPutAll, testMapRemove, testMapSize, testMapToString, testSampleMappings, useDuplicateValues, useNullKey, useNullValue, verify, verifyEntrySet, verifyKeySet, verifyMap, verifyValues |
| Methods inherited from class org.apache.commons.collections.BulkTest |
clone, makeSuite, toString |
| Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, setUp |
| Methods inherited from class junit.framework.Assert |
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.lang.Object objectInFullMap
| Constructor Detail |
public TestBeanMap(java.lang.String testName)
| Method Detail |
public static junit.framework.Test suite()
public java.lang.Object[] getSampleKeys()
TestMapTestMap.getSampleValues() and all array elements must be different. The default implementation constructs a set of String keys, and includes a single null key if TestMap.useNullKey() returns true.
getSampleKeys in class TestMappublic java.lang.Object[] getSampleValues()
TestMapTestMap.getSampleKeys(). The default implementation contructs a set of String values and includes a single null value if TestMap.useNullValue() returns true, and includes two values that are the same if TestMap.useDuplicateValues() returns true.
getSampleValues in class TestMappublic java.lang.Object[] getNewSampleValues()
TestMapTestMap.getSampleValues(). This method must return an array with the same length as TestMap.getSampleValues(). The values returned from this method should not be the same as those returned from TestMap.getSampleValues(). The default implementation constructs a set of String values and includes a single null value if TestMap.useNullValue() returns true, and includes two values that are the same if TestMap.useDuplicateValues() returns true.
getNewSampleValues in class TestMappublic boolean isAddRemoveModifiable()
isAddRemoveModifiable in class TestMappublic java.util.Map makeFullMap()
TestMapTestMap.getSampleKeys() and TestMap.getSampleValues(). The default implementation uses makeEmptyMap() and calls #addSampleMappings() to add all the mappings to the map.
makeFullMap in class TestMappublic java.util.Map makeEmptyMap()
TestMapMap to be used for testing.
makeEmptyMap in class TestMappublic void testClear()
public void testBeanMapClone()
public java.lang.String[] ignoredSimpleTests()
BulkTestIf a simple test that's defined by this BulkTest or by one of its bulk test methods has a name that's in the returned array, then that simple test will not be executed.
A simple test's name is formed by taking the class name of the root BulkTest, eliminating the package name, then appending the names of any bulk test methods that were invoked to get to the simple test, and then appending the simple test method name. The method names are delimited by periods:
TestHashMap.bulkTestEntrySet.testClearis the name of one of the simple tests defined in the sample classes described above. If the sample
TestHashMap class included this method:
public String[] ignoredSimpleTests() {
return new String[] { "TestHashMap.bulkTestEntrySet.testClear" };
}
then the entry set's clear method wouldn't be tested, but the key set's clear method would.
ignoredSimpleTests in class BulkTestpublic void testBeanMapPutAllWriteable()
|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||