February 2018
Intermediate to advanced
406 pages
9h 52m
English
Moving on. Next, you need to be able to calculate how much of a project is remaining and the rate of completion, and then put them together to determine a projected end date.
The next test is for the project to be able to calculate how much work is remaining.
I like to take a moment before I write a test to think about what the test needs. The typical test structure has three parts:
Given: What data does the test need? This test needs a project, at least one complete task, and at least one incomplete task.
When: What action is taking place? I’m calculating the remaining work.
Then: What behavior do I need to specify? The work-calculation result.
I also like to think about what could make the happy-path test fail; that’s more ...