Esempio n. 1
0
        public void IsSamePeriodTest()
        {
            DateTime             now         = ClockProxy.Clock.Now;
            SchoolDay            schoolDay   = new SchoolDay(now);
            TimePeriodCollection timePeriods = new TimePeriodCollection(schoolDay);

            Assert.True(timePeriods.IsSamePeriod(timePeriods));
            Assert.True(timePeriods.IsSamePeriod(schoolDay));

            Assert.True(schoolDay.IsSamePeriod(schoolDay));
            Assert.True(schoolDay.IsSamePeriod(timePeriods));

            Assert.False(timePeriods.IsSamePeriod(TimeBlock.Anytime));
            Assert.False(schoolDay.IsSamePeriod(TimeBlock.Anytime));

            timePeriods.RemoveAt(0);
            Assert.False(timePeriods.IsSamePeriod(schoolDay));
        }         // IsSamePeriodTest
Esempio n. 2
0
        public void IsSamePeriodTest()
        {
            var now         = ClockProxy.Clock.Now;
            var schoolDay   = new SchoolDay(now);
            var timePeriods = new TimePeriodCollection(schoolDay);

            Assert.IsTrue(timePeriods.IsSamePeriod(timePeriods));
            Assert.IsTrue(timePeriods.IsSamePeriod(schoolDay));

            Assert.IsTrue(schoolDay.IsSamePeriod(schoolDay));
            Assert.IsTrue(schoolDay.IsSamePeriod(timePeriods));

            Assert.IsFalse(timePeriods.IsSamePeriod(TimeBlock.Anytime));
            Assert.IsFalse(schoolDay.IsSamePeriod(TimeBlock.Anytime));

            timePeriods.RemoveAt(0);
            Assert.IsFalse(timePeriods.IsSamePeriod(schoolDay));
        }
        public void IsSamePeriodTest() {
            var now = ClockProxy.Clock.Now;
            var schoolDay = new SchoolDay(now);
            var timePeriods = new TimePeriodCollection(schoolDay);

            Assert.IsTrue(timePeriods.IsSamePeriod(timePeriods));
            Assert.IsTrue(timePeriods.IsSamePeriod(schoolDay));

            Assert.IsTrue(schoolDay.IsSamePeriod(schoolDay));
            Assert.IsTrue(schoolDay.IsSamePeriod(timePeriods));

            Assert.IsFalse(timePeriods.IsSamePeriod(TimeBlock.Anytime));
            Assert.IsFalse(schoolDay.IsSamePeriod(TimeBlock.Anytime));

            timePeriods.RemoveAt(0);
            Assert.IsFalse(timePeriods.IsSamePeriod(schoolDay));
        }