Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Xamarin.Forms

You're reading from   Mastering Xamarin.Forms App architecture techniques for building multi-platform, native mobile apps with Xamarin.Forms 4

Arrow left icon
Product type Paperback
Published in Dec 2019
Publisher
ISBN-13 9781839213380
Length 200 pages
Edition 3rd Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Ed Snider Ed Snider
Author Profile Icon Ed Snider
Ed Snider
Arrow right icon
View More author details
Toc

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 will be responsible for testing our ViewModels. There are many options and libraries to create unit tests in .NET with Visual Studio. In this chapter, we will use the NUnit Library Project template in Visual Studio for Mac.

In order to create a unit test project, perform the following steps:

  1. Create a new solution folder in the TripLog solution named Tests. Although this is not required, it helps keep any testing-related projects organized within the overall solution.

    To add a new solution folder in Visual Studio, simply right-click on the solution name, go to Add and click on Add Solution Folder, as shown in the following screenshot:

    Figure 1: Adding a solution folder in Visual Studio

    Adding a new solution folder in Visual Studio for Windows is the same process: right-click on the solution name, go to Add, and click on New Solution Folder...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image