Comparing Two objects using Assert.AreEqual()

Anyone who ever googled (binged?) about unit testing have heard about the “one assert per test rule”. The idea is that every unit test should have only one reason to fail. It’s a good rule that help me write good, robust unit test – but like all such rules-of-the-thumb it’s not always right (just most … Continue reading Comparing Two objects using Assert.AreEqual()

Using NUnit and FakeItEasy to create fake objects automatically for your tests

From time to time I get to teach and mentor Java developers on the fine art of unit testing. There are many similarities when unit testing in Java and .NET but more interesting are the differences between the two. Faking objects in Java using MockitoOne of the well-used Java Isolation (Mocking) frameworks is called Mockito … Continue reading Using NUnit and FakeItEasy to create fake objects automatically for your tests

What to do when FakeItEasy throws System.BadImageException

Today I had a weird problem at work. I’ve been working with a new team and they’ve been writing unit tests using FakeItEasy when they got a strange error message:System.BadImageFormatException: … The signature is incorrect.Now I’ve been using FakeItEasy for some time and I never once saw this strange behavior. Googling for the problem only … Continue reading What to do when FakeItEasy throws System.BadImageException