TODO app Â
The TODO app was another one of our early TDD examples. This app is far from complete, and we have received new requirements from the business, asking to add a feature to the application.
The business now wants the ability to complete a task in the TODO list. This feature is schedule current sprint and is the next story for us to work on.
Mark complete
For the Mark complete story, we have been asked to allow the user to complete any of the tasks in the TODO list. Adding this feature should be much like any other TDD exercise in this book. Before reading our solution to this problem, try to complete this one on your own. After you have passing tests, come back and look at the solution in this book.
Adding tests
In the ToDoApplicationTests
file, we have added a yak shaving
test to force us to create the complete method. This test also helps to define the API for the method:
[Fact(Skip = "Yak shaving - no longer needed")] public void CompleteTodoExists() { // Arrange var todo = new...