Chapter 38. Developing Custom Fixtures

As we pointed out in Chapter 11, using a custom format for a table can enable us to express tests more directly and clearly. We now look at the development of two simple general-purpose custom fixtures in order to encourage you to develop your own fixtures.

This chapter assumes that you are familiar with the Fit architecture, as introduced in Chapter 37.

38.1 Using SetUpFixture

A SetUpFixture table may be used for setting up the data at the start of a test, as we saw in Section 10.4 on p. 76. The setup table from that example is shown again in Figure 38.1. The fixture for that example was covered in Section 28.7 on p. 239, and is shown again in Listing 38.1.

Figure 38.1 SetUp Table

The method futureValueMaxBalanceMinPurchaseDiscountPercent( ) ...

Get Fit for Developing Software: Framework for Integrated Tests now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.