Section 10.5. CalculateFixture Tables


10.5. CalculateFixture Tables

ColumnFixture uses special characters after a calculated field name in the header row. CalculateFixture is a simple alternative; it separates the given (to the left) and calculated columns (to the right) with an empty column.

This is shown in the third table in Figure 10.5. The action in the first row of that table selects a CalculateFixture, which is applied to the rest of the table. Rather than having a column with the value low repeated, as in Section 6.2 on p. 43, the calculate with future value action takes low as an argument and uses it in testing all the calculations in the rest of table.

CalculateFixture tables are helpful when the special table cell values used in ColumnFixture[2]an empty cell, error, blank, and so onget in the way of the tests you need to write. CalculateFixture assumes no special words but allows them to be defined by the fixture. This means, for example, that you could choose to use .. instead of an empty cell to mean the same value as above in the table.

[2] As discussed in Section 9.1 on p. 67.



    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