NUnit TestCase - Array and Execution Order - NUnit Tutorial

In this C# NUnit tutorial, we'll learn about how to pass same type of objects array into test method and how to control the execution order of test methods. NUnit TestCase Array Below is the example of passing array to a test method. [TestCase(new int[] { 2, 4, 6 })] public void When_AllNumberAreEven_Expects_AreAllNumbersEvenAsTrue(int[] numbers) { Numbe...

Continue Reading

NUnit TestCase C# Tutorial

In our last tutorial, we learned about NUNit TestFixture attribute. In this tutorial, we learn about NUnit TestCase attribute and its usage. TestCase attribute is used for two purposes. It marks a method to Test Method. Pass arguments / parameters to Test Method. Test Method When we assign TestCase attribute to any method that lets NUnit test runner to d...

Continue Reading

NUnit TestFixture C# Tutorial

NUnit TestFixture attribute is a class level attribute and it indicates that this class contains NUnit Test Methods. Below are the topics we covered in this tutorial: TestFixture Example and Usage Parameterized TestFixtures TestFixture Inheritance Generic TestFixture TestFixture Restrictions NUnit TestFixture Example and Usage Below is the exa...

Continue Reading

Join our newsletter and get an occasional email with a technology and news update.