You are absolutely right. Unless you provide something like an IEqualityComparer<MyPerson>
or implement MyPerson.Equals()
, the two MyPerson
objects will be compared with object.Equals
, just like any other object. Since the objects are different, the Assert will fail.