public void Tick_ShouldDecrementRemaingTimeOfDeltaTime()
        {
            // Given
            var deltaTime = 5.5f;

            _defusingTime.GetDeltaTime().Returns(deltaTime);

            var timeToDefuse = 10;

            _currentDefuseAttempt.TimeToDefuse.Returns(timeToDefuse);
            _defusingState.SetNewDefuseAttempt(_currentDefuseAttempt);

            _defusingState.StartNewTimer();

            var timeBeforeTick = _defusingState.RemainingTime;

            // When
            _defusingState.Tick();

            // Then
            Assert.That(_defusingState.RemainingTime, Is.EqualTo(timeBeforeTick - deltaTime));
        }
Esempio n. 2
0
 public virtual void Init()
 {
     _defusingState.StartNewTimer();
 }