Introduction

NUnit is one of the most widely used unit testing frameworks in the .NET industry. NUnit code is essentially test code and the code that it tests is the application code. In your IDE, complete the following steps to set up an NUnit project:

  • Create a .NET core 5.0 or 6.0 console application project called Project.
  • In the same solution as the console application project, add an NUnit test project called ProjectTest.
  • In the NUnit test project, add a reference to the console application project.

Set up an application code project and test code project

Set up an application code project and test code project in your IDE. The details on how to do this are included in the appendix of this course.

Initial application and test code

Add a class called Account in the Project. In the Account class, paste the following code:

Get hands-on with 1400+ tech skills courses.