public void IsSamePeriodTest() { SchoolDay schoolDay = new SchoolDay(); TimeRange manualRange = new TimeRange(schoolDay.Start, schoolDay.End); Assert.True(schoolDay.IsSamePeriod(schoolDay)); Assert.True(schoolDay.IsSamePeriod(manualRange)); Assert.True(manualRange.IsSamePeriod(schoolDay)); Assert.False(schoolDay.IsSamePeriod(TimeBlock.Anytime)); Assert.False(manualRange.IsSamePeriod(TimeBlock.Anytime)); schoolDay.RemoveAt(0); Assert.False(schoolDay.IsSamePeriod(manualRange)); Assert.False(manualRange.IsSamePeriod(schoolDay)); } // IsSamePeriodTest
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