January 2020
Intermediate to advanced
304 pages
9h 8m
English
Chapter 1. The goal of unit testing
Listing 1.1. A sample method partially covered by a test
Listing 1.2. Version of IsStringLong that records the last result
Chapter 2. What is a unit test?
Listing 2.1. Tests written using the classical style of unit testing
Listing 2.2. Tests written using the London style of unit testing
Chapter 3. The anatomy of a unit test
Listing 3.1. A test covering the Sum method in calculator
Listing 3.2. A single-line act section
Listing 3.3. A two-line act section
Listing 3.4. Differentiating the SUT from its dependencies
Listing 3.5. Calculator with sections separated by empty lines
Listing 3.6. Arrangement and teardown logic, shared by all ...