public void Equals_ReturnsFalse_BecauseTheCitiesAreNotEqual(ICity first, ICity second) { // :::: ARRANGE :::: var comparer = new CityEqualityComparer(); // :::: ACT :::: var actualEquality = comparer.Equals(first, second); // :::: ASSERT :::: actualEquality.Should().BeFalse(); }
public void GetHashCode_ReturnsTheSameHashCodeForBothCities_BecauseTheCitiesAreEqual(ICity first, ICity second) { // :::: ARRANGE :::: var comparer = new CityEqualityComparer(); // :::: ACT :::: var firstHashCode = comparer.GetHashCode(first); var secondHashCode = comparer.GetHashCode(second); // :::: ASSERT :::: firstHashCode.Should().Be(secondHashCode); }