Assert.Equals of two objects implementing IEquatable (T) does not use the equals method

I have a custom Type Type that implements IEquatable (Type). Then I update two instances of the type, none of them are Null

Assert.IsTrue(obj1.equals(obj2)) //Success
Assert.AreEqual(obj1, obj2) //False
Assert.AreEqual(Type)(obj1, obj2) //False

The first gets to my equal numbers, the second to ToString () Any suggestions?

Update
some code to illustrate: http://pastebin.com/1uecrfeW

more updates
If I need to override the base values, even if the best (general) values ​​are available, then what use is the implementation of IEquals (T)?

+5
source share
2 answers

, Equals(object) Equals(T). Equals(object), , , , ToString .

, , ( Assert, - NUnit? - ?), .

+4

IIRC Assert.AreEqual , object.Equals; -generic object.Equals.

IEquatable<T> ( T). , , .

+2

All Articles