コード例 #1
0
        public void SetClockForOneMinute_FireGameClockTick_ShouldBe59Seconds()
        {
            //Arrange
            var startingTime = new GameTime()
            {
                Minutes = 1
            };

            clockController.SetGameTime(startingTime);

            //Act
            clockController.DecrementGameTimeByTenth();
            var time = clockController.GetGameTime();

            //Assert
            Assert.AreEqual(0, time.Minutes);
            Assert.AreEqual(59, time.Seconds);
            Assert.AreEqual(9, time.Tenths);
        }
コード例 #2
0
 private void GameClockTimer_Tick(object sender, EventArgs e)
 {
     ClockController.DecrementGameTimeByTenth();
 }