Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
        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);
        }
Example #5
0
        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);
        }
Example #6
0
        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);
        }
Example #7
0
        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);
        }
Example #8
0
        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);
        }