Re: Checking two Lists are equal or not??

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <[email protected]>
In that case, the problem isn't with the fact that it's a List, but with the
particular type not supporting equality. You can implement Equals on the
type or compare based on some property. You an also use a custom Comparer
through the Comparer modifier to EqualConstraint.
 
Charlie


  _____  

From: Chakkaradeep C C [mailto:[email protected]] 
Sent: Wednesday, January 09, 2008 3:58 AM
To: Charlie Poole
Cc: [email protected]
Subject: Re: [Nunit-users] Checking two Lists are equal or not??


Hi Charlie,


On Jan 9, 2008 3:22 PM, Charlie Poole <[email protected]> wrote:


Assert.That( expectedLists, Is.EqualTo( typeLists ) );


That doesn't work. Here is what I get,

NUnit.Framework.AssertionException:   Expected and actual are both
<System.Collections.Generic.List`1[Educator.DataAccess.Department ]> with 2
elements
  Values differ at index [0]
  Expected: <Educator.DataAccess.Department>
  But was:  <Educator.DataAccess.Department>



-- 
Regards,
C.C.Chakkaradeep ,
http://chakkaradeep.wordpress.com
--
"Sometimes it's better not to ask - or to listen - when people tell you
something can't be done. I didnt ask for permission or approval. I just went
ahead and did it."  - from "Direct from Dell"

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.