예제 #1
0
        public void DeveSerSegundaFeiraAPartirDeSabado()
        {
            //arrange
            var sabado  = new DateTime(2018, 03, 24);
            var diaUtil = new DiaUtil();

            //act
            var proximoDiaUtil = diaUtil.ProximoDiaUtil(sabado);
            var segunda        = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Monday];

            //assert
            Assert.AreEqual(segunda, proximoDiaUtil);
        }
예제 #2
0
        public void DeveSerTercaFeiraAPartirDeSegunda()
        {
            //arrange
            var segunda = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Monday];
            var diaUtil = new DiaUtil();

            //act
            var proximoDiaUtil = diaUtil.ProximoDiaUtil(segunda);
            var terca          = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Tuesday];


            //assert
            Assert.AreEqual(terca, proximoDiaUtil);
        }
예제 #3
0
        public void DeveSerSegundaFeiraAPartirDeDomingo()
        {
            //arrange
            var domingo = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Sunday];
            var diaUtil = new DiaUtil();

            //act
            var proximoDiaUtil = diaUtil.ProximoDiaUtil(domingo);
            var segunda        = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Monday];


            //assert
            Assert.AreEqual(segunda, proximoDiaUtil);
        }
예제 #4
0
        public void DeveSerQuintaFeiraAPartirDeSegundaSeTercaEQuartaForemFeriados()
        {
            //arrange
            var segunda = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Monday];
            var terca   = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Tuesday];
            var quarta  = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Wednesday];
            var diaUtil = new DiaUtil();

            //act
            var proximoDiaUtil = diaUtil.ProximoDiaUtil(segunda, new List <DateTime> {
                terca, quarta
            });
            var quinta = DiasUteisTestsInitializer.DiasParaTestes[DayOfWeek.Thursday];

            //assert
            Assert.AreEqual(quinta, proximoDiaUtil);
        }