IsSamePeriod() 공개 메소드

public IsSamePeriod ( ITimePeriod test ) : bool
test ITimePeriod
리턴 bool
        public void IsSamePeriodTest()
        {
            DateTime now = ClockProxy.Clock.Now;
            SchoolDay schoolDay = new SchoolDay( now );
            TimePeriodCollection 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 ) );
        }