Creating unit tests

Inside-Out testing, commonly known as unit testing, performs tests in individual components and its methods are completely independent of the UI. So, if you take a Classic-school architecture, bottom-up, you might have classes in layers like the data access repositories, models, viewmodels, and business logic components.

Unit tests are making sure that individual parts (units) of the application work independently, with any outside dependencies stubbed out and made irrelevant.

First, we will create a unit test project for the shared portable code and then two projects for specific platform device capabilities.

How to do it…

  1. We'll start with Classic-school testing. In Visual Studio, go to top menu and select File | New | Project ...

Get Xamarin: Cross-Platform Mobile Application Development 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.