コード例 #1
0
        public void CanAddSchedulesWithSameStpIndicator()
        {
            var service    = new CifService("X12345", Substitute.For <ILogger>());
            var permanent  = TestSchedules.CreateSchedule(indicator: StpIndicator.Permanent, calendar: TestSchedules.EverydayAugust2019);
            var permanent2 = TestSchedules.CreateSchedule(indicator: StpIndicator.Permanent, calendar: TestSchedules.CreateAugust2019Calendar(DaysFlag.Monday));

            service.Add(permanent);
            service.Add(permanent2);

            var schedules = service.GetSchedules();

            Assert.Equal(2, schedules.Count);
        }
コード例 #2
0
        public void CanAddSchedulesWithDifferentStpIndicator()
        {
            var service   = new CifService("X12345", Substitute.For <ILogger>());
            var permanent = TestSchedules.CreateSchedule(indicator: StpIndicator.Permanent, calendar: TestSchedules.EverydayAugust2019);
            var overlay   = TestSchedules.CreateSchedule(indicator: StpIndicator.Override, calendar: TestSchedules.EverydayAugust2019);

            service.Add(permanent);
            service.Add(overlay);

            var schedules = service.GetSchedules();

            Assert.Equal(2, schedules.Count);
        }