c# - NUnit Assert.AreEqual(object a, object b) false negative? -
I do not understand why NUnit convinces it. Arequal is failing.
var dataService = new data service (DB); DataService.Set ("Test", "Circle 1", Circle); Var NewsData = DataService Go ("Test", "Circle 1"); Assert.IsNotNull (circleData); Var newscap = newsdata. gate (); Decide. All (Circle, Circle Copy);
Using NHibernate (collecting serialized data, then disassemble it). I have inserted a breakpoint and inspected objects in the Local Variables window - they are identical.
There is a NIIT message here:
Assert.AreEqual failed. Expectancy: & lt; TestData.TestClassCircle & gt; Actual: & lt; TestData.TestClassCircle & gt;
Why would this test fail when the object is the same?
what is CircleData ? Does it override
equal
? I think you are cloning it, which means that you got two different CircleData examples
circadata override
equal
, then This will examine a reference parity, which will fail.
Comments
Post a Comment