org.castor.xmlctf

Interface CastorTestable

public interface CastorTestable

Every root object in an object model used in a tests has to implement this interface as well as to override the equals() method. It can be useful that all the objects in an object model used for tests implement this interface.
Version:
$Revision: 6785 $ $Date: 2003-10-15 09:17:49 -0600 (Wed, 15 Oct 2003) $
Author:
Sebastien Gignoux

Method Summary

String
dumpFields()
Returns a recursive dump of the contents of the object's fields in a user readable format.
void
randomizeFields()
Randomizes the contents of the fields of this instance.

Method Details

dumpFields

public String dumpFields()
Returns a recursive dump of the contents of the object's fields in a user readable format. This is used to retrieve the state of the object if castor fails to marshal the object for any reason.

We don't rely on the java.lang.Object.toString() function as might be implemented with another semantic.

Returns:
a recursive dump of the contents of the object's fields in a user readable format.

randomizeFields

public void randomizeFields()
            throws InstantiationException,
                   IllegalAccessException
Randomizes the contents of the fields of this instance. This is used to create an instance of the object model whithout having to unmarshal anything.

Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com