How NBuilder Could Help You Write Better .Net Unit Tests
One of the biggest challenges when creating unit tests is to come up test data. It makes sense having someone other than you test your code, so how about having someone other than you generate the test input for your .Net unit tests. Data generation tools aren’t new concept and they come in many different [...]
Pimp Up Your Unit Test Assertions
In this post I’m going to show you how you can write your unit test assertions to read more fluently and allow you to be more productive. The Plain Jane Unit Test Assertion [Test] public void The_Plain_Jane_Assertion() { const string firstString = "Hello World"; const string secondString = "Hello World"; const int smallNumber = 1; [...]
Ever Thought About Changing How You Name Unit Tests?
In the last couple of months I’ve seen a new convention of how developers are naming their unit test classes. Traditionally the naming convention most developers use is to append the word ‘Tests’ to the class name as shown below. public class UserValidation { } [TestFixture] public class UserValidationTests { } There is absolutely nothing [...]
Creating the animals game using Asp.Net MVC, jQuery and jQueryUI
A few weeks ago we had some fun creating a demo for a game using the jQuery and jQuery UI libraries in the ‘Having fun with jQuery UI’ blog post. In this post we will go through how to create the game using ASP.NET MVC, jQuery and jQuery UI. The screenshot below shows the game [...]
A solution for the Resharper Test Runner not picking up your latest changes
For a while now I thought there was a bug when using Resharper to run my unit tests. Because my latest changes were not being picked up, I always had to build my solution first and then run the unit tests. Not anymore. Today a colleague showed me this ‘Build Settings’ option Selecting ‘Always Build’ [...]
« go back — keep looking »