コード例 #1
0
        public void SaturdayHasExtraTwoDays()
        {
            PostOffice postOffice = new PostOffice();
            var        date       = postOffice.CalculateDespatchDate(new Order(new List <int>()
            {
                1
            }, new DateTime(2018, 1, 26)));

            date.Date.ShouldBe(new DateTime(2018, 1, 26).Date.AddDays(3));
        }
コード例 #2
0
        public void SundayHasExtraDay()
        {
            PostOffice postOffice = new PostOffice();
            var        date       = postOffice.CalculateDespatchDate(new Order(new List <int>()
            {
                3
            }, new DateTime(2018, 1, 25)));

            date.Date.ShouldBe(new DateTime(2018, 1, 25).Date.AddDays(4));
        }
コード例 #3
0
        public void OneProductWithLeadTimeOfThreeDay()
        {
            PostOffice postOffice = new PostOffice();
            var        date       = postOffice.CalculateDespatchDate(new Order(new List <int>()
            {
                3
            }, DateTime.Now));

            date.Date.ShouldBe(DateTime.Now.Date.AddDays(3));
        }