public void DoesNothing_If_ShowCountdown_IsFalse_And_IsSwitchedOff()
        {
            _changeHandler.ConfigUpdated(new ConfigSettings {
                ShowCountdown = false
            });

            _timer.AssertWasNotCalled(t => t.SwitchOff());
            _timer.AssertWasNotCalled(t => t.SwitchOn());
            _view.AssertWasNotCalled(v => v.Invoke(Arg <Action> .Is.Anything));
        }
示例#2
0
        public void CanUpdateSkin_FirstTime_WhenCurrentSkinIsNull()
        {
            _skinChangeHandler.ConfigUpdated(new ConfigSettings {
                SkinName = "newSkin"
            });

            _skinLoader.ShouldHaveBeenCalled(l => l.Load(Arg <Skin> .Matches(s => s.Name == "newSkin")));
        }
        public void DoesNotUpdate_If_IntervalAlreadyEqual()
        {
            _pollTimer.Expect(p => p.Interval).Return(TimeSpan.FromSeconds(5));

            _pollingChangeHandler.ConfigUpdated(new ConfigSettings {
                PollFrequency = 5
            });

            _pollTimer.AssertWasNotCalled(p => p.Stop());
            _countdownChangeHandler.AssertWasNotCalled(c => c.Reset());
            _pollTimer.AssertWasNotCalled(p => p.Start());
        }