Geeks With Blogs
Boy Meets 'Hello World' Blogging the journey from College Grad to .NET Developer April 2008 Entries
Developing made easier through Equals overriding.
I often have found that working with small, immutable objects can be very helpful. First off, they are extremely easy to test, typically not needing any sort of mocking involved. Second, due to their immutable state, you can easily override Equals to use to your advantage. The advantage I'll talk about today is the ability to introduce a new test seam that doesn't depend upon inversion of control to be able to test an object. Suppose I'm writing an object that will represent a query. The query should ......

Posted On Wednesday, April 23, 2008 10:01 PM

Beyond ExpectedException
Note: For users of NUnit, version 2.5 will have an Assert.Throws method. This version is currently available in alpha status. On the ALT.NET mailing list, there was a discussion about using the [ExpectedException] attribute in NUnit. Most people have come to figure out that using the ExpectedException attribute on your tests has disadvantages. First, your test will not be able to pinpoint exactly where the exception is supposed to occur. You could get false negatives for having the exception thrown ......

Posted On Thursday, April 17, 2008 6:09 AM

Copyright © mhildreth | Powered by: