Category: Testing
-
Getting started with .NET unit testing using NUnit
It’s usually good practice to have automated unit tests while developing your code. Doing so helps you find bugs early in the development cycle and saves you time in the long run. These tests can be run by the developer multiple times to verify the behavior of a particular unit of code for different sets…
-
How to Unit Test Private Methods in MS Test
Before we start to see, how a private method can be unit tested using the MS Test? Let us discuss whether it is a good idea to test a private method or not? Often I have seen there are two school of thoughts, Private methods should be tested. Private methods should not be tested. To…
-
TestFixtureSetUp and TestFixtureTearDown in Unit Testing using NUnit: Part 4
We have been learning Unit Testing using NUnit together. Read first three parts of this series below, How to do Unit Test using NUnit : Part 1 Test SetUp and TearDown in Unit Testing using NUnit : Part 2 Ignore Test in Unit Testing using NUnit: Part 3 In Part 2 , we discussed about…
-
Ignore Test in Unit Testing using NUnit: Part 3
We have been learning Unit Testing using NUnit together. Read first two part of this series below, How to do Unit Test using NUnit : Part 1 Test SetUp and TearDown in Unit Testing using NUnit : Part 2 You may come across a scenario when test is itself broken. While executing test you need…
-
Test SetUp and TearDown in Unit Testing using NUnit : Part 2
Read Part 1 here: How to do Unit Test using NUnit : Part 1 In last post we talked about how to start with Unit Testing using NUnit. In this post I will discuss about following two topics, Test Setup Test Teardown You need Test Setup and Test Teardown to remove any dependency between tests.…
-
How to do Unit Test using NUnit : Part 1
Unit Testing is essential part of any production code. We can see rise of Test Driven Development (TDD) approach in many development projects. There are certain pros and cons of TDD but certainly we cannot ignore TDD way of software development. I read many blogs and tweets about TDD and got inspired to do some…