Your turn!
Following along with the provided code is a great way to learn through practice.
A better way is by challenging yourself to achieve tasks. Hence, I challenge you to improve the Bookmarkr application by adding the following features.
Task #1 – Write the required unit tests for the remaining functionalities
In this chapter, we wrote tests only for the link
and import
commands. You are hence challenged to write tests for the other commands. You will have to figure out what test cases are to be considered and implement them.
Task #2 – Write integration tests for the sync command
The sync
command deals with a database. For the purpose of unit testing, you can mock the database using NSubstitute. However, when implementing an integration test, you need a real database. You are then challenged to write integration tests for the sync
command. You will have to provide a test database and use the appropriate connection string depending on whether the application...