public class Student
{
public string Name { get; set; }
public int ID { get; set; }
}
...
var st1 = new Student
{
ID =
You can also use NFluent with the this syntax to deep compare two objects without implementing equality for your objects. NFluent is a library that tries to simplify writing readable test code.
Check.That(actual).HasFieldsWithSameValues(expected);
This method with fail with an exception containing all the differences instead of failing at the first one. I find this feature to be a plus.