public void IndexOfTest()
{
DateTime now = ClockProxy.Clock.Now;
SchoolDay schoolDay = new SchoolDay( now );
TimePeriodCollection timePeriods = new TimePeriodCollection();
Assert.AreEqual( timePeriods.IndexOf( new TimeRange() ), -1 );
Assert.AreEqual( timePeriods.IndexOf( new TimeBlock() ), -1 );
timePeriods.AddAll( schoolDay );
Assert.AreEqual( timePeriods.IndexOf( schoolDay.Lesson1 ), 0 );
Assert.AreEqual( timePeriods.IndexOf( schoolDay.Break1 ), 1 );
Assert.AreEqual( timePeriods.IndexOf( schoolDay.Lesson2 ), 2 );
Assert.AreEqual( timePeriods.IndexOf( schoolDay.Break2 ), 3 );
Assert.AreEqual( timePeriods.IndexOf( schoolDay.Lesson3 ), 4 );
Assert.AreEqual( timePeriods.IndexOf( schoolDay.Break3 ), 5 );
Assert.AreEqual( timePeriods.IndexOf( schoolDay.Lesson4 ), 6 );
timePeriods.Remove( schoolDay.Lesson1 );
Assert.AreEqual( timePeriods.IndexOf( schoolDay.Lesson1 ), -1 );
}