Remove() public method

public Remove ( ITimePeriod item ) : bool
item ITimePeriod
return bool
        public void RemoveTest()
        {
            DateTime now = ClockProxy.Clock.Now;
            SchoolDay schoolDay = new SchoolDay( now );
            TimePeriodCollection timePeriods = new TimePeriodCollection();

            Assert.IsFalse( timePeriods.Contains( schoolDay.Lesson1 ) );
            timePeriods.Add( schoolDay.Lesson1 );
            Assert.IsTrue( timePeriods.Contains( schoolDay.Lesson1 ) );
            timePeriods.Remove( schoolDay.Lesson1 );
            Assert.IsFalse( timePeriods.Contains( schoolDay.Lesson1 ) );
        }
        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 );
        }