|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mockobjects.ReturnObjectList
This class allows a list of objects to be setup which can be used whilst.The list is check to make sure that all the object in it are used and that none are left over at the end of a test.
For ever sucessive call to nextReturnObject the next object in the list will returned.
If the nextReturnObject method is called and there are no objects in the list an assertion error will be thrown. If the verify method is called and there are objects still in the list an assertion error will also be thrown.
Constructor Summary | |
ReturnObjectList(java.lang.String aName)
Construct a new empty list |
Method Summary | |
void |
addObjectToReturn(boolean aBooleanToReturn)
Add a next boolean to the end of the list. |
void |
addObjectToReturn(int anIntegerToReturn)
Add a next integer to the end of the list. |
void |
addObjectToReturn(java.lang.Object anObjectToReturn)
Add a next object to the end of the list. |
java.lang.Object |
nextReturnObject()
Returns the next object from the list. |
void |
verify()
Verify that there are no objects left within the list. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReturnObjectList(java.lang.String aName)
aName
- Label used to identify listMethod Detail |
public void addObjectToReturn(java.lang.Object anObjectToReturn)
anObjectToReturn
- object to be added to the listpublic void addObjectToReturn(boolean aBooleanToReturn)
aBooleanToReturn
- boolean to be added to the listpublic void addObjectToReturn(int anIntegerToReturn)
anIntegerToReturn
- integer to be added to the listpublic java.lang.Object nextReturnObject()
public void verify()
verify
in interface Verifiable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |