3.4. Selecting a Phone NumberOur third example illustrates the use of simple lists in tests. The business rule for this example is very simple.
A single test is shown in Figure 3.5. The phones column contains a comma-separated list of phone numbers. The calculated column first() selects the first one in the list.
When the elements of a list are more complex, such as containing details of each order item within an order, this approach doesn't work. A RowFixture table can be used instead, as discussed in Chapter 5. Questions & Answers
Programmers The fixture code for the tests here is given in Section 21.3 on p. 184. |