May 2019
Intermediate to advanced
504 pages
11h 50m
English
As you might have noticed in the previous tests we have implemented, one of the most time-consuming parts of writing a unit test is implementing the arrange portion of the implementation. In this portion, we are essentially setting up the system under test that will be used by the test target. In this setup, our goal is to bring the system to a known state so that the results can be compared with the expected results. This known state is also known as a fixture.
In this context, a fixture can be as simple as a mock container that contains the determinate set of components that defines the System Under Test (SUT), or a factory that is driven with a predictable behavioral pattern.
For instance, if we were to ...
Read now
Unlock full access