Fit for Developing Software: Framework for Integrated Tests

25.4. Summary

Other values may be used in Fit tables, but we need to provide the following extra information about the associated class:

  • How to convert from a String to an object of the given class. This conversion is defined by the parse() method in the fixture. The method will usually pass control to a static method of the class, such as parse() in Money.

  • How to create a String from an object of our class. This operation is defined by the toString() of the class.

  • How to compare two objects of our class for equality. This operation is defined by the equals() of the class.

    Категории