Exercise 1: Insert a New Row Into a Database Table

After you have finished this exercise, you understand how you can write the table level assertion which ensures that a database table has the correct number of rows after you have inserted a new row into the database table. You can finish this exercise by following these steps:

1. Open the CreateTodoItemTest class that’s found from the com.cleantestautomation.assertjdb.todoitem package.

2. Write the table level assertion which ensures that the system under inserts a new row into the todo_item table. You have to add this assertion to the shouldInsertNewTodoItemIntoDatabase() method.

3. Run the tests found from the CreateTodoItemTest class and make sure that they pass.