28.11. Using Other Values in Flow TablesAs we saw in Section 25.2 on p. 214, a Fit fixture class overrides the method parse() to allow new types of values, such as Money, to be used in table cells. The FitLibrary fixtures, as in FitNesse, provide another approach, which avoids any duplication. These fixtures check whether the class of the value has a static method parse() that takes a String and returns an object of that class. Sometimes, we want to handle values in a special way. For example, in Section 34.4 on p. 292, we want to write Date values without the seconds. A DoFixture object, such as the flow fixture object, may call the DoFixture method registerParseDelegate() to register the current object as the one that handles the parsing of other values for any flow fixture objects. |