public void GIVEN_EqualByValue_WHEN_GetHashCode_THEN_True() { // Arrange var one = new HostMap("127.0.0.1", "localhost"); var two = new HostMap("127.0.0.1", "localhost"); // Act var oneHash = one.GetHashCode(); var twoHash = two.GetHashCode(); // Assert Assert.AreEqual(oneHash, twoHash); }
public void GIVEN_NotEqualByValue_WHEN_GetHashCode_THEN_False() { // Arrange var one = new HostMap("127.0.0.1", "localhost"); var two = new HostMap("192.168.0.1", "gateway"); // Act var oneHash = one.GetHashCode(); var twoHash = two.GetHashCode(); // Assert Assert.AreNotEqual(oneHash, twoHash); }