Java Doc for AbstractTestMap.java in  » Library » Apache-common-Collections » org » apache » commons » collections » map » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache common Collections » org.apache.commons.collections.map 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.commons.collections.BulkTest
   org.apache.commons.collections.AbstractTestObject
      org.apache.commons.collections.map.AbstractTestMap

All known Subclasses:   org.apache.commons.collections.TestSequencedHashMap,  org.apache.commons.collections.map.TestTransformedMap,  org.apache.commons.collections.bidimap.AbstractTestBidiMap,  org.apache.commons.collections.map.TestPredicatedMap,  org.apache.commons.collections.TestBeanMap,  org.apache.commons.collections.TestMultiHashMap,  org.apache.commons.collections.map.TestLazyMap,  org.apache.commons.collections.TestFastHashMap,  org.apache.commons.collections.map.TestCompositeMap,  org.apache.commons.collections.map.TestFixedSizeMap,  org.apache.commons.collections.TestTreeMap,  org.apache.commons.collections.TestReferenceMap,  org.apache.commons.collections.map.TestStaticBucketMap,  org.apache.commons.collections.map.AbstractTestSortedMap,  org.apache.commons.collections.TestDoubleOrderedMap,  org.apache.commons.collections.map.AbstractTestIterableMap,  org.apache.commons.collections.TestStaticBucketMap,  org.apache.commons.collections.map.TestDefaultedMap,
AbstractTestMap
abstract public class AbstractTestMap extends AbstractTestObject (Code)
Abstract test class for java.util.Map methods and contracts.

The forces at work here are similar to those in AbstractTestCollection . If your class implements the full Map interface, including optional operations, simply extend this class, and implement the AbstractTestMap.makeEmptyMap() method.

On the other hand, if your map implementation is weird, you may have to override one or more of the other protected methods. They're described below.

Entry Population Methods

Override these methods if your map requires special entries:

Supported Operation Methods

Override these methods if your map doesn't support certain operations:

Fixture Methods

For tests on modification operations (puts and removes), fixtures are used to verify that that operation results in correct state for the map and its collection views. Basically, the modification is performed against your map implementation, and an identical modification is performed against a confirmed map implementation. A confirmed map implementation is something like java.util.HashMap, which is known to conform exactly to the Map contract. After the modification takes place on both your map implementation and the confirmed map implementation, the two maps are compared to see if their state is identical. The comparison also compares the collection views to make sure they're still the same.

The upshot of all that is that any test that modifies the map in any way will verify that all of the map's state is still correct, including the state of its collection views. So for instance if a key is removed by the map's key set's iterator, then the entry set is checked to make sure the key/value pair no longer appears.

The AbstractTestMap.map field holds an instance of your collection implementation. The AbstractTestMap.entrySet , AbstractTestMap.keySet and AbstractTestMap.values fields hold that map's collection views. And the AbstractTestMap.confirmed field holds an instance of the confirmed collection implementation. The AbstractTestMap.resetEmpty() and AbstractTestMap.resetFull() methods set these fields to empty or full maps, so that tests can proceed from a known state.

After a modification operation to both AbstractTestMap.map and AbstractTestMap.confirmed , the AbstractTestMap.verify() method is invoked to compare the results. The AbstractTestMap.verify method calls separate methods to verify the map and its three collection views ( AbstractTestMap.verifyMap , AbstractTestMap.verifyEntrySet , AbstractTestMap.verifyKeySet , and AbstractTestMap.verifyValues ). You may want to override one of the verification methodsto perform additional verifications. For instance, TestDoubleOrderedMap would want override its AbstractTestMap.verifyValues() method to verify that the values are unique and in ascending order.

Other Notes

If your Map fails one of these tests by design, you may still use this base set of cases. Simply override the test case (method) your map fails and/or the methods that define the assumptions used by the test cases. For example, if your map does not allow duplicate values, override AbstractTestMap.isAllowDuplicateValues() and have it return false
author:
   Michael Smith
author:
   Rodney Waldhoff
author:
   Paul Jack
author:
   Stephen Colebourne
version:
   $Revision: 169097 $ $Date: 2005-05-07 18:13:40 +0100 (Sat, 07 May 2005) $


Inner Class :public class TestMapEntrySet extends AbstractTestSet
Inner Class :public class TestMapKeySet extends AbstractTestSet
Inner Class :public class TestMapValues extends AbstractTestCollection

Field Summary
protected  Mapconfirmed
     HashMap created by reset().
protected  SetentrySet
     Entry set of map created by reset().
protected  SetkeySet
     Key set of map created by reset().
protected  Mapmap
     Map created by reset().
protected  Collectionvalues
     Values collection of map created by reset().

Constructor Summary
public  AbstractTestMap(String testName)
     JUnit constructor.

Method Summary
public  voidaddSampleMappings(Map m)
     Helper method to add all the mappings described by AbstractTestMap.getSampleKeys() and AbstractTestMap.getSampleValues() .
public  BulkTestbulkTestMapEntrySet()
     Bulk test Map.entrySet .
public  BulkTestbulkTestMapKeySet()
     Bulk test Map.keySet .
public  BulkTestbulkTestMapValues()
     Bulk test Map.values .
public  Map.EntrycloneMapEntry(Map.Entry entry)
     Creates a new Map Entry that is independent of the first and the map.
public  StringgetCompatibilityVersion()
     Gets the compatability version, needed for package access.
public  Object[]getNewSampleValues()
     Returns a the set of values that can be used to replace the values returned from AbstractTestMap.getSampleValues() .
public  Object[]getOtherKeys()
    
public  Object[]getOtherNonNullStringElements()
     Returns a list of string elements suitable for return by AbstractTestMap.getOtherKeys() or AbstractTestMap.getOtherValues .
public  Object[]getOtherValues()
    
public  Object[]getSampleKeys()
     Returns the set of keys in the mappings used to test the map.
public  Object[]getSampleValues()
     Returns the set of values in the mappings used to test the map.
public  booleanisAllowDuplicateValues()
     Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() supports duplicate values.
public  booleanisAllowNullKey()
     Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() supports null keys.
public  booleanisAllowNullValue()
     Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() supports null values.
public  booleanisGetStructuralModify()
     Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() can cause structural modification on a get().
public  booleanisPutAddSupported()
     Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() support the put and putAll operations adding new mappings.
public  booleanisPutChangeSupported()
     Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() support the put and putAll operations changing existing mappings.
public  booleanisRemoveSupported()
     Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() support the remove and clear operations.
public  booleanisSetValueSupported()
     Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() support the setValue operation on entrySet entries.
public  booleanisSubMapViewsSerializable()
     Returns whether the sub map views of SortedMap are serializable.
public  MapmakeConfirmedMap()
     Override to return a map other than HashMap as the confirmed map.
abstract public  MapmakeEmptyMap()
     Return a new, empty Map to be used for testing.
public  MapmakeFullMap()
     Return a new, populated map.
public  ObjectmakeObject()
     Implements the superclass method to return the map to be tested.
public  voidresetEmpty()
     Resets the AbstractTestMap.map , AbstractTestMap.entrySet , AbstractTestMap.keySet , AbstractTestMap.values and AbstractTestMap.confirmed fields to empty.
public  voidresetFull()
     Resets the AbstractTestMap.map , AbstractTestMap.entrySet , AbstractTestMap.keySet , AbstractTestMap.values and AbstractTestMap.confirmed fields to full.
public  voidtearDown()
     Erases any leftover instance variables by setting them to null.
public  voidtestEmptyMapCompatibility()
     Compare the current serialized form of the Map against the canonical version in CVS.
public  voidtestEntrySetClearChangesMap()
     Tests that the Map.entrySet collection is backed by the underlying map for clear().
public  voidtestEntrySetContains1()
    
public  voidtestEntrySetContains2()
    
public  voidtestEntrySetContains3()
    
public  voidtestEntrySetRemove1()
    
public  voidtestEntrySetRemove2()
    
public  voidtestEntrySetRemove3()
    
public  voidtestFullMapCompatibility()
     Compare the current serialized form of the Map against the canonical version in CVS.
public  voidtestKeySetClearChangesMap()
     Tests that the Map.keySet collection is backed by the underlying map for clear().
public  voidtestKeySetRemoveChangesMap()
     Tests that the Map.keySet set is backed by the underlying map by removing from the keySet set and testing if the key was removed from the map.
public  voidtestMakeMap()
     Test to ensure that makeEmptyMap and makeFull returns a new non-null map with each invocation.
public  voidtestMapClear()
     Tests Map.clear .
public  voidtestMapContainsKey()
     Tests Map.containsKey(Object) by verifying it returns false for all sample keys on a map created using an empty map and returns true for all sample keys returned on a full map.
public  voidtestMapContainsValue()
     Tests Map.containsValue(Object) by verifying it returns false for all sample values on an empty map and returns true for all sample values on a full map.
public  voidtestMapEquals()
    
public  voidtestMapGet()
    
public  voidtestMapHashCode()
    
public  voidtestMapIsEmpty()
    
public  voidtestMapPut()
    
public  voidtestMapPutAll()
    
public  voidtestMapPutNullKey()
    
public  voidtestMapPutNullValue()
    
public  voidtestMapRemove()
    
public  voidtestMapSize()
    
public  voidtestMapToString()
     Tests Map.toString().
public  voidtestSampleMappings()
     Test to ensure the test setup is working properly.
public  voidtestValuesClearChangesMap()
     Tests that the Map.values collection is backed by the underlying map for clear().
public  voidtestValuesRemoveChangesMap()
     Tests that the Map.values collection is backed by the underlying map by removing from the values collection and testing if the value was removed from the map.
public  voidverify()
     Verifies that AbstractTestMap.map is still equal to AbstractTestMap.confirmed . This method checks that the map is equal to the HashMap, and that the map's collection views are still equal to the HashMap's collection views.
public  voidverifyEntrySet()
    
public  voidverifyKeySet()
    
public  voidverifyMap()
    
public  voidverifyValues()
    

Field Detail
confirmed
protected Map confirmed(Code)
HashMap created by reset().



entrySet
protected Set entrySet(Code)
Entry set of map created by reset().



keySet
protected Set keySet(Code)
Key set of map created by reset().



map
protected Map map(Code)
Map created by reset().



values
protected Collection values(Code)
Values collection of map created by reset().




Constructor Detail
AbstractTestMap
public AbstractTestMap(String testName)(Code)
JUnit constructor.
Parameters:
  testName - the test name




Method Detail
addSampleMappings
public void addSampleMappings(Map m)(Code)
Helper method to add all the mappings described by AbstractTestMap.getSampleKeys() and AbstractTestMap.getSampleValues() .



bulkTestMapEntrySet
public BulkTest bulkTestMapEntrySet()(Code)
Bulk test Map.entrySet . This method runs through all of the tests in AbstractTestSet . After modification operations, AbstractTestMap.verify() is invoked to ensure that the map and the other collection views are still valid. a AbstractTestSet instance for testing the map's entry set



bulkTestMapKeySet
public BulkTest bulkTestMapKeySet()(Code)
Bulk test Map.keySet . This method runs through all of the tests in AbstractTestSet . After modification operations, AbstractTestMap.verify() is invoked to ensure that the map and the other collection views are still valid. a AbstractTestSet instance for testing the map's key set



bulkTestMapValues
public BulkTest bulkTestMapValues()(Code)
Bulk test Map.values . This method runs through all of the tests in AbstractTestCollection . After modification operations, AbstractTestMap.verify() is invoked to ensure that the map and the other collection views are still valid. a AbstractTestCollection instance for testing the map'svalues collection



cloneMapEntry
public Map.Entry cloneMapEntry(Map.Entry entry)(Code)
Creates a new Map Entry that is independent of the first and the map.



getCompatibilityVersion
public String getCompatibilityVersion()(Code)
Gets the compatability version, needed for package access.



getNewSampleValues
public Object[] getNewSampleValues()(Code)
Returns a the set of values that can be used to replace the values returned from AbstractTestMap.getSampleValues() . This method must return an array with the same length as AbstractTestMap.getSampleValues() . The values returned from this method should not be the same as those returned from AbstractTestMap.getSampleValues() . The default implementation constructs a set of String values and includes a single null value if AbstractTestMap.isAllowNullValue() returns true, and includes two values that are the same if AbstractTestMap.isAllowDuplicateValues() returns true.



getOtherKeys
public Object[] getOtherKeys()(Code)



getOtherNonNullStringElements
public Object[] getOtherNonNullStringElements()(Code)
Returns a list of string elements suitable for return by AbstractTestMap.getOtherKeys() or AbstractTestMap.getOtherValues .

Override getOtherElements to returnthe results of this method if your collection does not support heterogenous elements or the null element.




getOtherValues
public Object[] getOtherValues()(Code)



getSampleKeys
public Object[] getSampleKeys()(Code)
Returns the set of keys in the mappings used to test the map. This method must return an array with the same length as AbstractTestMap.getSampleValues() and all array elements must be different. The default implementation constructs a set of String keys, and includes a single null key if AbstractTestMap.isAllowNullKey() returns true.



getSampleValues
public Object[] getSampleValues()(Code)
Returns the set of values in the mappings used to test the map. This method must return an array with the same length as AbstractTestMap.getSampleKeys() . The default implementation constructs a set of String values and includes a single null value if AbstractTestMap.isAllowNullValue() returns true, and includes two values that are the same if AbstractTestMap.isAllowDuplicateValues() returns true.



isAllowDuplicateValues
public boolean isAllowDuplicateValues()(Code)
Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() supports duplicate values.

Default implementation returns true. Override if your collection class does not support duplicate values.




isAllowNullKey
public boolean isAllowNullKey()(Code)
Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() supports null keys.

Default implementation returns true. Override if your collection class does not support null keys.




isAllowNullValue
public boolean isAllowNullValue()(Code)
Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() supports null values.

Default implementation returns true. Override if your collection class does not support null values.




isGetStructuralModify
public boolean isGetStructuralModify()(Code)
Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() can cause structural modification on a get(). The example is LRUMap.

Default implementation returns false. Override if your map class structurally modifies on get.




isPutAddSupported
public boolean isPutAddSupported()(Code)
Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() support the put and putAll operations adding new mappings.

Default implementation returns true. Override if your collection class does not support put adding.




isPutChangeSupported
public boolean isPutChangeSupported()(Code)
Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() support the put and putAll operations changing existing mappings.

Default implementation returns true. Override if your collection class does not support put changing.




isRemoveSupported
public boolean isRemoveSupported()(Code)
Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() support the remove and clear operations.

Default implementation returns true. Override if your collection class does not support removal operations.




isSetValueSupported
public boolean isSetValueSupported()(Code)
Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() support the setValue operation on entrySet entries.

Default implementation returns isPutChangeSupported(). Override if your collection class does not support setValue but does support put changing.




isSubMapViewsSerializable
public boolean isSubMapViewsSerializable()(Code)
Returns whether the sub map views of SortedMap are serializable. If the class being tested is based around a TreeMap then you should override and return false as TreeMap has a bug in deserialization. false



makeConfirmedMap
public Map makeConfirmedMap()(Code)
Override to return a map other than HashMap as the confirmed map. a map that is known to be valid



makeEmptyMap
abstract public Map makeEmptyMap()(Code)
Return a new, empty Map to be used for testing. the map to be tested



makeFullMap
public Map makeFullMap()(Code)
Return a new, populated map. The mappings in the map should match the keys and values returned from AbstractTestMap.getSampleKeys() and AbstractTestMap.getSampleValues() . The default implementation uses makeEmptyMap() and calls AbstractTestMap.addSampleMappings to add all the mappings to the map. the map to be tested



makeObject
public Object makeObject()(Code)
Implements the superclass method to return the map to be tested. the map to be tested



resetEmpty
public void resetEmpty()(Code)
Resets the AbstractTestMap.map , AbstractTestMap.entrySet , AbstractTestMap.keySet , AbstractTestMap.values and AbstractTestMap.confirmed fields to empty.



resetFull
public void resetFull()(Code)
Resets the AbstractTestMap.map , AbstractTestMap.entrySet , AbstractTestMap.keySet , AbstractTestMap.values and AbstractTestMap.confirmed fields to full.



tearDown
public void tearDown() throws Exception(Code)
Erases any leftover instance variables by setting them to null.



testEmptyMapCompatibility
public void testEmptyMapCompatibility() throws Exception(Code)
Compare the current serialized form of the Map against the canonical version in CVS.



testEntrySetClearChangesMap
public void testEntrySetClearChangesMap()(Code)
Tests that the Map.entrySet collection is backed by the underlying map for clear().



testEntrySetContains1
public void testEntrySetContains1()(Code)



testEntrySetContains2
public void testEntrySetContains2()(Code)



testEntrySetContains3
public void testEntrySetContains3()(Code)



testEntrySetRemove1
public void testEntrySetRemove1()(Code)



testEntrySetRemove2
public void testEntrySetRemove2()(Code)



testEntrySetRemove3
public void testEntrySetRemove3()(Code)



testFullMapCompatibility
public void testFullMapCompatibility() throws Exception(Code)
Compare the current serialized form of the Map against the canonical version in CVS.



testKeySetClearChangesMap
public void testKeySetClearChangesMap()(Code)
Tests that the Map.keySet collection is backed by the underlying map for clear().



testKeySetRemoveChangesMap
public void testKeySetRemoveChangesMap()(Code)
Tests that the Map.keySet set is backed by the underlying map by removing from the keySet set and testing if the key was removed from the map.



testMakeMap
public void testMakeMap()(Code)
Test to ensure that makeEmptyMap and makeFull returns a new non-null map with each invocation.



testMapClear
public void testMapClear()(Code)
Tests Map.clear . If the map AbstractTestMap.isRemoveSupported() can add and remove elements}, then Map.size and Map.isEmpty are used to ensure that map has no elements after a call to clear. If the map does not support adding and removing elements, this method checks to ensure clear throws an UnsupportedOperationException.



testMapContainsKey
public void testMapContainsKey()(Code)
Tests Map.containsKey(Object) by verifying it returns false for all sample keys on a map created using an empty map and returns true for all sample keys returned on a full map.



testMapContainsValue
public void testMapContainsValue()(Code)
Tests Map.containsValue(Object) by verifying it returns false for all sample values on an empty map and returns true for all sample values on a full map.



testMapEquals
public void testMapEquals()(Code)
Tests Map.equals(Object)



testMapGet
public void testMapGet()(Code)
Tests Map.get(Object)



testMapHashCode
public void testMapHashCode()(Code)
Tests Map.hashCode()



testMapIsEmpty
public void testMapIsEmpty()(Code)
Tests Map.isEmpty()



testMapPut
public void testMapPut()(Code)
Tests Map.put(Object, Object)



testMapPutAll
public void testMapPutAll()(Code)
Tests Map.putAll(map)



testMapPutNullKey
public void testMapPutNullKey()(Code)
Tests Map.put(null, value)



testMapPutNullValue
public void testMapPutNullValue()(Code)
Tests Map.put(null, value)



testMapRemove
public void testMapRemove()(Code)
Tests Map.remove(Object)



testMapSize
public void testMapSize()(Code)
Tests Map.size()



testMapToString
public void testMapToString()(Code)
Tests Map.toString(). Since the format of the string returned by the toString() method is not defined in the Map interface, there is no common way to test the results of the toString() method. Thereforce, it is encouraged that Map implementations override this test with one that checks the format matches any format defined in its API. This default implementation just verifies that the toString() method does not return null.



testSampleMappings
public void testSampleMappings()(Code)
Test to ensure the test setup is working properly. This method checks to ensure that the getSampleKeys and getSampleValues methods are returning results that look appropriate. That is, they both return a non-null array of equal length. The keys array must not have any duplicate values, and may only contain a (single) null key if isNullKeySupported() returns true. The values array must only have a null value if useNullValue() is true and may only have duplicate values if isAllowDuplicateValues() returns true.



testValuesClearChangesMap
public void testValuesClearChangesMap()(Code)
Tests that the Map.values collection is backed by the underlying map for clear().



testValuesRemoveChangesMap
public void testValuesRemoveChangesMap()(Code)
Tests that the Map.values collection is backed by the underlying map by removing from the values collection and testing if the value was removed from the map.

We should really test the "vice versa" case--that values removed from the map are removed from the values collection--also, but that's a more difficult test to construct (lacking a "removeValue" method.)

See bug 9573.




verify
public void verify()(Code)
Verifies that AbstractTestMap.map is still equal to AbstractTestMap.confirmed . This method checks that the map is equal to the HashMap, and that the map's collection views are still equal to the HashMap's collection views. An equals test is done on the maps and their collection views; their size and isEmpty results are compared; their hashCodes are compared; and containsAll tests are run on the collection views.



verifyEntrySet
public void verifyEntrySet()(Code)



verifyKeySet
public void verifyKeySet()(Code)



verifyMap
public void verifyMap()(Code)



verifyValues
public void verifyValues()(Code)



Fields inherited from org.apache.commons.collections.AbstractTestObject
final public static int COLLECTIONS_MAJOR_VERSION(Code)(Java Doc)

Methods inherited from org.apache.commons.collections.AbstractTestObject
protected String getCanonicalEmptyCollectionName(Object object)(Code)(Java Doc)
protected String getCanonicalFullCollectionName(Object object)(Code)(Java Doc)
public String getCompatibilityVersion()(Code)(Java Doc)
public boolean isEqualsCheckable()(Code)(Java Doc)
public boolean isTestSerialization()(Code)(Java Doc)
abstract public Object makeObject()(Code)(Java Doc)
protected Object readExternalFormFromBytes(byte[] b) throws IOException, ClassNotFoundException(Code)(Java Doc)
protected Object readExternalFormFromDisk(String path) throws IOException, ClassNotFoundException(Code)(Java Doc)
protected boolean skipSerializedCanonicalTests()(Code)(Java Doc)
public boolean supportsEmptyCollections()(Code)(Java Doc)
public boolean supportsFullCollections()(Code)(Java Doc)
public void testCanonicalEmptyCollectionExists()(Code)(Java Doc)
public void testCanonicalFullCollectionExists()(Code)(Java Doc)
public void testEqualsNull()(Code)(Java Doc)
public void testObjectEqualsSelf()(Code)(Java Doc)
public void testObjectHashCodeEqualsContract()(Code)(Java Doc)
public void testObjectHashCodeEqualsSelfHashCode()(Code)(Java Doc)
public void testSerializeDeserializeThenCompare() throws Exception(Code)(Java Doc)
public void testSimpleSerialization() throws Exception(Code)(Java Doc)
protected byte[] writeExternalFormToBytes(Serializable o) throws IOException(Code)(Java Doc)
protected void writeExternalFormToDisk(Serializable o, String path) throws IOException(Code)(Java Doc)

Methods inherited from org.apache.commons.collections.BulkTest
public Object clone()(Code)(Java Doc)
public String[] ignoredTests()(Code)(Java Doc)
public static TestSuite makeSuite(Class c)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.