If you haven't gone through my other posts about unit testing, then I would recommend you to please walk through these posts first: All about unit testing and Example of unit testing. What is Mock? If you will search in dictionary about mock, then you will find its meaning as below. An object under test may … Continue reading Object mocking in unit testing
Category: Unit tests
Parameterized unit tests in MS test framework
Earlier, In MS test framework, we do not have any options to create Parameterized unit tests. So all we have to do is we have to write multiple unit test cases with same code. See below example which dictate this situation. Example: We have a string and we need to change its case from lower … Continue reading Parameterized unit tests in MS test framework
Example of Unit tests using MS test framework
I've already shared basics of unit testing here. Lets see some examples of unit testing. In this post, I have used MS test framework. You can use your own testing framework. Lets take a simple example where we want to add two numbers in Calculator program and we want to test this functionality using unit … Continue reading Example of Unit tests using MS test framework
Unit testing
In this post, I'll share stuffs related to Unit testing only. I'll share examples of Unit testing in later posts. What is Unit testing? Unit means a small portion of your code. So Unit testing means test each small-small functionalities of an application. In procedural programming, unit is a whole module but in object oriented … Continue reading Unit testing