public void Equals_SameEnpontValueDifferentEndpointType_ReturnsFalse() { var endPoint1 = new DateEndPoint(new DateInterval(now, inOneHour), EndPointType.Max); var endPoint2 = new DateEndPoint(new DateInterval(inOneHour, inTwoHours), EndPointType.Min); //Act bool equals = endPoint1.Equals(endPoint2); //Assert Assert.IsFalse(equals); }
public void Equals_WithNull_ReturnsFalse() { //Arrange var endPoint = new DateEndPoint(new DateInterval(now, inOneHour), EndPointType.Min); //Act bool equals = endPoint.Equals(null); //Assert Assert.IsFalse(equals); }
public void Equals_DifferentEndpointValues_ReturnsFalse(bool includeFirstIntervalEdge, bool includeSecondIntervalEdge, bool expectedResult) { //Arrange var endPoint1 = new DateEndPoint(new DateInterval(now, inOneHour), EndPointType.Min); var endPoint2 = new DateEndPoint(new DateInterval(inTwoHours, inThreeHours), EndPointType.Min); //Act bool equals = endPoint1.Equals(endPoint2); //Assert Assert.AreEqual(expectedResult, equals); }
public void Equals_TheSameEndpointValue_ReturnsCorrectExpectedResult(bool includeFirstIntervalEdge, bool includeSecondIntervalEdge, bool expectedResult) { //Arrange var endPoint1 = new DateEndPoint(new DateInterval(now, inOneHour, includeFirstIntervalEdge), EndPointType.Min); var endPoint2 = new DateEndPoint(new DateInterval(now, inTwoHours, includeSecondIntervalEdge), EndPointType.Min); //Act bool equals = endPoint1.Equals(endPoint2); //Assert Assert.AreEqual(expectedResult, equals); }