Geeks With Blogs

News



Add to Google

Tim Hibbard CEO for EnGraph software

This morning I was working on some unit tests, when NUnit threw this error message at me:

TestBed.Trip.Construction :
expected: <System.Collections.Generic.List`1[Medicaid.Entities.Leg]>
  but was: <System.Collections.Generic.List`1[Medicaid.Entities.Leg]>

My girlfriend tells me that it not what I say, but HOW I say it.  Maybe NUnit could sense my sarcasm.

 

Technorati tags:
Posted on Wednesday, February 7, 2007 8:01 AM .NET | Back to top


Comments on this post: I just can't please you NUnit!

# re: I just can't please you NUnit!
Requesting Gravatar...
Maybe nunit is right.
A generic class from one assembly does not EQUAL a generic type from another assembly...
Simply as that...
Left by Liviu on Feb 07, 2007 8:05 AM

# re: I just can't please you NUnit!
Requesting Gravatar...
Dude,

For the sake of your own sanity, write your own assertion logic that will spit out surplus and missing "Leg" objects from the comparison.

Assert.AreEqual() is probably comparing the two List's as objects, and the equality would be false if they aren't the same instance.
Left by Jeremy Miller on Feb 07, 2007 9:25 AM

# re: I just can't please you NUnit!
Requesting Gravatar...
You really should do a better job of trying to humanize a testing framework. :) But if it makes you feel any better, I got your joke.
Left by Chelsea on Feb 08, 2007 12:45 PM

Your comment:
 (will show your gravatar)


Copyright © Tim Hibbard | Powered by: GeeksWithBlogs.net