Exemplo n.º 1
0
        public void PostCalculateOverralDays_EndDateLessThanStartDate_0()
        {
            //Arrange
            VacationController controller = new VacationController(mock.Object);
            string             fromDate   = "15.03.2014";
            string             toDate     = "01.03.2014";

            //Act
            var result = controller.CalculateOverralDays(fromDate, toDate);

            //Assert
            Assert.AreEqual(0, result);
        }
Exemplo n.º 2
0
        public void PostCalculateOverralDays_CorrectDates_DifferenceBetweenEndDateAndStartDate()
        {
            //Arrange
            VacationController controller = new VacationController(mock.Object);
            string             fromDate   = "01.03.2014";
            string             toDate     = "15.03.2014";

            //Act
            var result = controller.CalculateOverralDays(fromDate, toDate);

            //Assert
            Assert.AreEqual(15, result);
        }
Exemplo n.º 3
0
        public void PostCalculateOverralDays_BadDatesFormat_0()
        {
            //Arrange
            VacationController controller = new VacationController(mock.Object);
            string             fromDate   = "123.456.444";
            string             toDate     = "12.34.111";

            //Act
            var result = controller.CalculateOverralDays(fromDate, toDate);

            //Assert
            Assert.AreEqual(0, result);
        }