public void When_Two_Instances_Are_Equals_Then_They_Have_Same_Hash_Code() { // ARRANGE var left = new NonEmptyString("foo"); var right = new NonEmptyString("foo"); // ACT var result1 = left.GetHashCode(); var result2 = right.GetHashCode(); // ASSERT Assert.AreEqual(result1, result2); }