Chapter 35. Running Calculation Tests Indirectly
In Chapter 16, we showed that many similar action tests may being used to test several business rules, including rules that are better handled as calculation tests. We now show two ways that Emily and Neo implemented the fixtures for those calculation tests. One approach is to have a fixture that calls directly into the specific logic that handles that business rule. This approach is good when the business rule is encoded as a distinct piece of logic, ideally as a function that can be called directly.
The other, indirect, approach is similar to the approach Emily used in Chapter 32, when there was no API that she could ...
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.