Public bug reported: Hi!
I've a class that implements IEnumerable interface and overrides the Eqauls(object obj) method. For this class Assert.AreEqual(object expected, object actual) doesn't calls overridden Equals method. I investigate this issue by source code. I see that method private bool AreEqual(object x, object y, EnumerableRecursionHelper recursionHelper, ref Tolerance tolerance) defined in NUnitEqualityComparer doesn't calls Equals method of object if it implements IEnumerable. I think it will be better if any special comparison will be called after calling Equals and last one returns false value. Thanks, Sergey ** Affects: nunitv2 Importance: Undecided Status: New -- You received this bug notification because you are a member of NUnit Developers, which is subscribed to NUnit V2. https://bugs.launchpad.net/bugs/1186689 Title: Assert.AreEqual dosn't works correctly for IEnumerable targets Status in NUnit V2 Test Framework: New Bug description: Hi! I've a class that implements IEnumerable interface and overrides the Eqauls(object obj) method. For this class Assert.AreEqual(object expected, object actual) doesn't calls overridden Equals method. I investigate this issue by source code. I see that method private bool AreEqual(object x, object y, EnumerableRecursionHelper recursionHelper, ref Tolerance tolerance) defined in NUnitEqualityComparer doesn't calls Equals method of object if it implements IEnumerable. I think it will be better if any special comparison will be called after calling Equals and last one returns false value. Thanks, Sergey To manage notifications about this bug go to: https://bugs.launchpad.net/nunitv2/+bug/1186689/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~nunit-core Post to : nunit-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~nunit-core More help : https://help.launchpad.net/ListHelp