コード例 #1
0
            public void JumpTo()
            {
                DiSetup.Tests();

                ITimeService timeService = DiHelper.GetService <ITimeService>();

                TimeSpan target = new TimeSpan(3, 2, 1, 59, 999);

                timeService.JumpTo(target);

                Assert.IsTrue(StandardTimeServiceTests.timeEquals(target, timeService.ElapsedTimeRelative, new TimeSpan(0, 0, 1)));
            }
コード例 #2
0
            public void Play()
            {
                DiSetup.Tests();

                ITimeService timeService = DiHelper.GetService <ITimeService>();

                timeService.Align();
                timeService.Play();

                //TODO: address issue that this does not work in 'bunch run mode'

                Assert.AreEqual(1, timeService.CurrentMultiplicator);
                Assert.IsNull(timeService.CurrentTarget);
                Assert.IsTrue(StandardTimeServiceTests.timeEquals(timeService.ElapsedTimeAbsolute, timeService.ElapsedTimeRelative, new TimeSpan(0, 0, 1)));
            }