8
Testing
Throughout this book, we've implemented patterns and best practices with the intention of separating the layers of our TripLog app, making it easier to maintain and test. Over the course of this chapter, we'll write unit tests for the business logic in our ViewModels.
In this chapter, we'll cover the following topics:
- Adding a unit test project to our solution
- Writing unit tests for some of the ViewModels in our app
- Running unit tests and fixing a failing test
We'll start by adding a new NUnit project to our solution, to contain all of the unit tests we'll write throughout the rest of the chapter.
Unit testing
To test the business logic in our TripLog app, we'll start out by creating a new unit test project in our solution that ...
Get Mastering Xamarin.Forms - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.