Tag Archives: unit testing

Mental Block

Today, I seem to be having a mental block while writing some unit tests. I keep writing Assert.AreSame() instead of Assert.AreEqual() and then wondering why tests are failing with bizarre message like “Expected 2, Actual 2” Just in case anyone … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Unit Testing a Static Class

I’ve been trying to find a way to unit test a static class. That is, a class that has no instances. The problem has been that at the end of one test the class’s state could be altered which would … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Test Driven Development By Example

Introduction A lot has been written on the subject of test driven development, and especially on the idea that tests ought to be written first. This is an ideal that I strive for, however, I have a tendency to write … Continue reading

Posted in Article, Software Development | Tagged , , , , | Leave a comment

An introduction to mock objects

Sometimes when you are unit testing you might get to a point where you say “That’s too difficult to unit test so I’m just going to leave it”. This is where mock objects come in. Mock objects are stand-in dummy … Continue reading

Posted in Community, Talk Examples | Tagged , | Leave a comment