Section 28.11. Using Other Values in Flow Tables


28.11. Using Other Values in Flow Tables

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



    Fit for Developing Software. Framework for Integrated Tests
    Fit for Developing Software: Framework for Integrated Tests
    ISBN: 0321269349
    EAN: 2147483647
    Year: 2005
    Pages: 331

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net