public void ShouldGenerateSameHashcodeWhenEquals() { var valType = new DummyValueType { Id = 10, Name = "Miguel" }; var anotherValType = new DummyValueType { Id = 10, Name = "Miguel" }; Assert.AreEqual(valType.GetHashCode(), anotherValType.GetHashCode()); }
public void ShouldGenerateSameHashcodeWhenEquals() { var val1 = new DummyValueType { Id = 10, Name = "Miguel" }; var val2 = new DummyValueType { Id = 10, Name = "Miguel" }; val1.GetHashCode().Should().Be(val2.GetHashCode()); }