June 21, 2013
In a previous post, I mentioned that model validation should be tested separately from controller logic. I will demonstrate a way of unit testing the validation of models implemented with System.ComponentModel.DataAnnotations. It is actually quire easy to unit test model validation. Models are inherently easy to test separately due to their POD (Plain Old Data) nature.
CategoriesDevelopment
Tags.net, asp.net, c#, mvc, unit-test
June 11, 2013
I came across a question on stackoverflow concerning comparing object for equality in unit test. The poster basically wants to get rid of series of assertions like this:
CategoriesDevelopment
Tags.net, c#, nunit, stackoverflow, unit-test
June 10, 2013
I can’t say I like all the aspects of Microsoft ASP.Net MVC. But there is one aspect that I like though is the ability to unit test most of the components of your application. Standard ASP.Net did not prevent you from testing your application. However, the framework and documentation did not encourage you to organize
CategoriesDevelopment
Tags.net, asp.net, c#, mvc, nunit, unit-test