|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.junit.Assert
net.sf.molae.pipe.test.ObjectTest<B>
net.sf.molae.pipe.test.MapEntryTest<B,K,V>
public class MapEntryTest<B extends Map.Entry<K,V>,K,V>
Test methods to check the contract of map entry implementing classes.
| Constructor Summary | |
|---|---|
protected |
MapEntryTest(B testObject)
Creates a new test with the specified candidate. |
| Method Summary | ||
|---|---|---|
void |
assertConsistency()
Checks consistency of all reading map entry methods. |
|
void |
assertImmutability()
Calls all modifying methods of the underlying map entry and checks if they throw an UnsupportedOperationException. |
|
protected static
|
newInstance(Map.Entry<K,V> testObject)
Creates a new test with the specified candidate. |
|
| Methods inherited from class net.sf.molae.pipe.test.ObjectTest |
|---|
assertFalse, assertTestValuesSet, getTestObject, setTestValuesSet, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected MapEntryTest(B testObject)
testObject - the candidate of the test
NullPointerException - if the specified test objects is
null.| Method Detail |
|---|
protected static <K,V> MapEntryTest<Map.Entry<K,V>,K,V> newInstance(Map.Entry<K,V> testObject)
testObject - the candidate of the test
NullPointerException - if the specified test objects is
null.public void assertConsistency()
assertConsistency in class ObjectTest<B extends Map.Entry<K,V>>AssertionFailedError - if the map entry contract is broken by
the tested entry.public void assertImmutability()
UnsupportedOperationException.
AssertionFailedError - if any of the called operations
did not throw an UnsupportedOperationException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||