|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An ICxFactory is an extension of ImplFactory that has provisions for cleaning up generated objects on test tear down. Generated objects could either have a finalize() method (not recommended, especially for tests), or the factory could implement this interface to allow proper, timely clean-up.
The clean-up is performed by InterfaceTestCase in the tearDown() method. If the hierarchy tests do not use this, but instead use a variation of junit.framework.Test, then they will need to implement their own tearDown() functionality.
A valid alternative is to use Mock-Objects (www.mockobjects.org), which would not need to be cleaned up like "live" objects do.
Method Summary | |
void |
tearDown(java.lang.Object implObject)
Allows the implementation to clean-up the instantiated object. |
Methods inherited from interface net.sourceforge.groboutils.junit.v1.iftc.ImplFactory |
createImplObject, toString |
Method Detail |
public void tearDown(java.lang.Object implObject) throws java.lang.Exception
implObject
- one of the objects created by this factory.
java.lang.Exception
- can be thrown when the deconstruction fails.
This will not disrupt the remaining objects' tear down
call.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |