tdd

Dealing with implementation concerns in TDD

I've just got started on TDD and very quickly ran into a brick wall. Here's my scenario... I'm trying to model an Image object, and going through the TDD steps I've started with a simple object which eventual grew into... public class ImageObject { public string Name {get; set;} public int Width {get; set;} public int Height {get; s...

How to write a unit test for "T must be a reference type"?

Consider: class MyClass<T> where T : class { } In that case, the where clause is enforcing a specification that MyClass is only a generic of a reference type. Ideally I should have a unit test that tests this specification. However, this unit test obviously won't work, but it explains what I'm trying to accomplish: [Test] [DoesNotC...

Comparing two lists with MSpec

Which method should I use to assert that two lists contains the same objects with MSpec? ...