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

    Modifier and Type
    Method
    Description
    Returns a recursive dump of the contents of the object's fields in a user readable format.
    void
    Randomizes the contents of the fields of this instance.
  • Method Details

    • dumpFields

      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 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

      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.
      Throws:
      InstantiationException - if this method is called for an Interface or abstract class
      IllegalAccessException - if this method is not accessible