Assert.AreEqual in MSTest – done right

Every unit testing framework out there comes with a plethora of assertion methods - this is not necessarily a good thing. Instead of writing simple code a developer is forced to choose the correct assertion method from a seemingly endless list of methods, most of which look exactly the same! Having multiple overloaded methods with … Continue reading Assert.AreEqual in MSTest – done right

Enabling parameterized tests in MSTest using PostSharp

I have blogged about the shortcoming of Microsoft’s unit testing framework in the past. It has very good Visual Studio (and TYFS) integration out of the box but it seems that in order to use it I have to suffer lack of functionality I’m used to taking for granted when using any other .NET unit … Continue reading Enabling parameterized tests in MSTest using PostSharp

Find out where is the method that was called unexpectedly using fake objects

Every Isolation/Mocking framework out there can verify that a method of a fake object was called and not less important make sure that certain methods are not called. Let’s say that I want to make sure that a method didn’t encounter any errors during execution but verifying that logger.Error was not called: [TestFixture]public class MyClassTests{ … Continue reading Find out where is the method that was called unexpectedly using fake objects