public void EqualsToAnotherObjectType_ShouldReturnFalse() { // Arrange var cityItem = new CityItem(); // Act var result = cityItem.Equals(new object()); // Assert Assert.False(result); }
public void EqualsToUserWithDifferentProperties_ShouldReturnFalse(string name, int distance, string name1, int distance1) { // Arrange var cityItem = new CityItem { Name = name, Distance = distance }; var cityItem_1 = new CityItem { Name = name1, Distance = distance1 }; // Act var result = cityItem.Equals(cityItem_1); // Assert Assert.False(result); }
public void EqualsToUserWithSameProperties_ShouldReturnTrue() { // Arrange var cityItem = new CityItem { Name = "cityItem", Distance = 10 }; var cityItem_1 = new CityItem { Name = "cityItem", Distance = 10 }; // Act var result = cityItem.Equals(cityItem_1); // Assert Assert.True(result); }