October 2016
Intermediate to advanced
364 pages
9h 8m
English
The initial test list identified one task for adding a task and one for deleting a task.
Let’s now focus on the addTask function.
When we analyzed the getTasks function, a single test for that function transformed into multiple tests in the test list. We can expect a similar result for the addTask function as well. Let’s analyze the addTask function.
First, we need the data for the new task. A new model newTask within the controller can store this data. We need to initialize this model to have a name property and a date property. We also need a function to convert the newTask to the JSON format expected by the server.
addTask ...
Read now
Unlock full access