Seems like a utility assert that was added at once time by Peli to solve
some particular problem he was having.
But I agree it doesn't seem overly general.
We should probably remove this feature and instead allow similar ones to be
constructed from more primitive parts as needed.
eg.
Assert.That.Property("x").Of(foo).IsEqualTo(Property("x").Of(bar));
(ok, awful syntax but you get the idea)
Jeff.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of hmobius
Sent: Friday, December 07, 2007 5:57 AM
To: MbUnit.User
Subject: MbUnit Assert.AreValueEqual
Hi,
Has anyone on this group used Assert.AreValueEqual() at all and if so, could
they let me know in what context. Having searched for it online, the only
code reference i could find for it (ironically) was a koders.com link to the
MbUnit source where it is used in the code for a DataAssert.
(http://www.koders.com/csharp/
fid30A0B172C08973DB6270CD3E0E98923918C56900.aspx)
What I can't figure out is
1. Why I'd use AreValueEqual(PropertyInfo_for_some_param, obj1, obj2) as
opposed to AreEqual(obj1.some_param, obj2.some_param)?
2. In what context I would use it? it seems to imply that I would know the
structure of obj1 but not of obj2. Does that imply (via the koders
example) it might be used in the case where obj2 inherits from obj1 and
possible a few others things, but you only need to know whether the obj1
properties have the same values?
Any and all help would be gratefully accepted.
Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/MbUnitUser?hl=en
-~----------~----~----~----~------~----~------~--~---