Skip to content

Ermlab/how-to-start-testing-with-nunit

Repository files navigation

How to start testing with NUnit

Description

This project shows basic using of NUnit library for unit testing .Net project. It was used as an example for a post on our blog.

In project we show:

  • Usage of TestFixtureAttribute and TestAttribute
  • How to write first simplest test with 3A approach: Arrange, Act, Assert
  • How to write a test with parameters using TestCaseAttribute
  • How to compare lists with primitive types in unit test
  • How to pass more complex parameters to unit test with TestCaseSourceAttribute

How to run project

You will need Visual Studio 2017 with installed NUnit Runner extension. I think I didn't use any features of new C#, so it should run without problems in earlier Visual Studio too.

Used technology

In this project we used:

  • C#
  • NUnit

Releases

No releases published

Packages

No packages published

Languages