コード例 #1
0
ファイル: Default.aspx.cs プロジェクト: dev4jam/avant-mybeepr
        private int GetBusinessDays(DateTime startDate, DateTime endDate)
        {
            var businessDays = interactor.GetBizDays(startDate, endDate, source);

            return(businessDays);
        }
コード例 #2
0
ファイル: UnitTest.cs プロジェクト: dev4jam/avant-mybeepr
        public void TestMethodZeroDays()
        {
            var startDate = new DateTime(2018, 11, 23);
            var endDate   = new DateTime(2018, 11, 26);

            var bizDays = interactor.GetBizDays(startDate, endDate, source);

            Assert.AreEqual(bizDays, 0);

            startDate = new DateTime(2018, 11, 24);
            endDate   = new DateTime(2018, 11, 26);

            bizDays = interactor.GetBizDays(startDate, endDate, source);

            Assert.AreEqual(bizDays, 0);

            startDate = new DateTime(2018, 11, 25);
            endDate   = new DateTime(2018, 11, 26);

            bizDays = interactor.GetBizDays(startDate, endDate, source);

            Assert.AreEqual(bizDays, 0);

            startDate = new DateTime(2018, 11, 25);
            endDate   = new DateTime(2018, 11, 26);

            bizDays = interactor.GetBizDays(startDate, endDate, source);

            Assert.AreEqual(bizDays, 0);

            startDate = new DateTime(2018, 11, 26);
            endDate   = new DateTime(2018, 11, 27);

            bizDays = interactor.GetBizDays(startDate, endDate, source);

            Assert.AreEqual(bizDays, 0);
        }