Exemplo n.º 1
0
        public void ifSunday_ReturnMonday()
        {
            DateTime input = new DateTime(2019, 5, 5);
            var      mockHolidayService = new HolidayService();
            var      _bill    = new Bill(mockHolidayService);
            var      output   = _bill.CheckDate(input);
            var      expected = new DateTime(2019, 5, 6);

            Assert.AreEqual(expected, output);
        }
Exemplo n.º 2
0
        public void ifHoliday_ReturnWeekday()
        {
            DateTime input = new DateTime(2018, 8, 3); // Tuesday 12/15  or Friday 8/3
            var      mockHolidayService = new HolidayService();
            var      _bill    = new Bill(mockHolidayService);
            var      output   = _bill.CheckDate(input);
            var      expected = new DateTime(2018, 8, 6);

            Assert.AreEqual(expected, output);
        }
Exemplo n.º 3
0
        public void ifBussinessDay_ReturnDueDate()
        {
            DateTime input = new DateTime(2018, 8, 6);
            var      mockHolidayService = new HolidayService();
            var      _bill    = new Bill(mockHolidayService);
            var      output   = _bill.CheckDate(input);
            var      expected = input;

            Assert.AreEqual(expected, output);
        }
Exemplo n.º 4
0
        //bring in holiday service to check for holidays
        //use dependency injection

        public Bill(HolidayService holiday)
        {
            this.Holiday = holiday;
        }