September 2007 - Posts
There has been mixed reaction to the removal of [SetUp] and [TearDown] in xUnit.net. Personally, I think it's great as it helps to raise unit test 'smells', particularly around how classes interact with each another. Here's a small example of how we can
Read More...
Depending on how your unit tests are setup, you may not be running as the proper user and won't have the necessary permissions to invoke a method. If this happens, you can easily alter the principle thread's identity with the following code. For instance,
Read More...
NUnit is dead! Long live xUnit.net! There are several cool features, including aspect-like extensibility for tests, but the two changes that will immediately make a difference in my day-to-day coding are: [ExpectedException] is gone. In its place is Assert.Throws<T>(
Read More...
I'm currently working on a project that has a Cache database that stores query results, and so naturally there are times when I'm playing inside of Management Studio that I want to delete the cache. However, I don't want to drop the entire database (because
Read More...
Toby is less than happy. Due to some unforeseen circumstances , he recently lost all the code he'd been working on for the EDM project. For some unknown reason, he'd never bothered to setup a source control server and vows to not make the same mistake
Read More...
One morning, as Toby is drinking his cup of hot water, a thought strikes him - did the acceptance stories really cover everything he discovered about the domain in the first few days? Slightly worried, he finds the paragraph he so proudly wrote a while
Read More...
So it's become obvious that having a large, all-encompassing EDMSystem class was probably not the way to go. It did give us a way to express what we wanted our acceptance tests to do, but the time has come to bite the bullet and take a look at where the
Read More...
Being passionate about anything can have its drawbacks; in my zeal to give inside-out development a shot, I completely disregarded a couple principles I hold dear. SRP ? Out the window. Test-first code? Left by the side of the road. I do have a set of
Read More...