Moving on. We 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.
Now that we have the basic infrastructure in place, we can go a little bit faster, which manifests itself in a test that has a little more setup. Our 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? We’re calculating the remaining work.
Then: What ...
No credit card required