August 14, 2013
Have you ever been annoyed with having to implement the cumbersome plumbing required for INotifyPropertyChanged ? Well, I have. So I tried to find a way to make authoring bindable objects better. The typical example:
CategoriesDevelopment
Tags.net, c#
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
June 3, 2013
In my previous post about XPathNavigator, I explained in what circumstances the default implementation of XPathNavigator is troublesome. I went over the design of the class and highlighted how that design helps us re-implement XPathNavigator to address the issue. Testing XPathNavigator First things first, before attacking the new implementation proper, we want to make sure
CategoriesUncategorized
Tags.net, c#, xml, xpath
May 24, 2013
This post is the first in a series of posts related to XPathDocument and XPathNavigator. I will highlight the qualities and drawbacks of the standard .Net implementations and go through the design and development of a new implementation that fits better to my needs. First, what is an XPathDocument ? An XPathDocument is used when you
CategoriesDevelopment
Tags.net, c#, xml, xpath
May 24, 2013
Writing code is fun. At least it is for me. But sometimes it gets irritating. You know, you’re busy on something, you write the code, you know it’s right but it doesn’t work… You keep your focus on that one piece of code you just wrote and it keeps on not working. Sometimes, the reason
CategoriesUncategorized
Tags.net, c#, xml, xpath