IsSamePeriod() public method

public IsSamePeriod ( ITimePeriod test ) : bool
test ITimePeriod
return 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 ) );
        }