Compare equality between two objects in NUnit
问题 I'm trying to assert that one object is "equal" to another object. The objects are just instances of a class with a bunch of public properties. Is there an easy way to have NUnit assert equality based on the properties? This is my current solution but I think there may be something better: Assert.AreEqual(LeftObject.Property1, RightObject.Property1) Assert.AreEqual(LeftObject.Property2, RightObject.Property2) Assert.AreEqual(LeftObject.Property3, RightObject.Property3) ... Assert.AreEqual