public void GetHashCode_ObjectWithIntProperty_ReturnsIntValue(int value0) { var intObject0 = new ComparableIntObject { IntValue = value0 }; // Act var result = intObject0.GetHashCode(); // Assert result .Should() .Be(value0.GetHashCode()); }
public void Equals_WithObjectArgObject0EqualObject1_ReturnsTrue(int value0, int value1) { var intObject0 = new ComparableIntObject { IntValue = value0 }; object intObject1 = new ComparableIntObject { IntValue = value1 }; // Act var result = intObject0.Equals(intObject1); // Assert result .Should() .BeTrue(); }
public void CompareTo_Object0EqualToObject1_ReturnsGreaterThanZero(int value0, int value1) { var intObject0 = new ComparableIntObject { IntValue = value0 }; var intObject1 = new ComparableIntObject { IntValue = value1 }; // Act var result = intObject0.CompareTo(intObject1); // Assert result .Should() .Be(0); }
public void Equals_Object0NotEqualObject1_ReturnsFalse(int value0, int value1) { var intObject0 = new ComparableIntObject { IntValue = value0 }; var intObject1 = new ComparableIntObject { IntValue = value1 }; // Act var result = intObject0.Equals(intObject1); // Assert result .Should() .BeFalse(); }