Move() public méthode

public Move ( System.TimeSpan delta ) : void
delta System.TimeSpan
Résultat void
        public void MoveTest()
        {
            DateTime now = ClockProxy.Clock.Now;
            SchoolDay schoolDay = new SchoolDay( now );
            TimePeriodCollection timePeriods = new TimePeriodCollection( schoolDay );

            DateTime startDate = schoolDay.Start;
            DateTime endDate = schoolDay.End;
            TimeSpan startDuration = timePeriods.Duration;

            TimeSpan duration = Duration.Hour;
            timePeriods.Move( duration );

            Assert.AreEqual( timePeriods.Start, startDate.Add( duration ) );
            Assert.AreEqual( timePeriods.End, endDate.Add( duration ) );
            Assert.AreEqual( timePeriods.Duration, startDuration );
        }