public void GetHashCode_DifferentClasses_DifferentHash() { // Arrange var intValue = 317; var strValue = "s"; var fooA = new TestSettings1 { IntProperty = intValue, StringPropert = strValue }; var fooB = new TestSettings2 { IntProperty = intValue, StringPropert = strValue }; // Act var hashA = fooA.GetHashCode(); var hashB = fooB.GetHashCode(); // Assert Assert.AreNotEqual(hashA, hashB); }