예제 #1
0
 private void OnStateChanged(object sender, PomoTimerStateChangeEventArgs eventargs)
 {
     switch (eventargs.State)
     {
         case PomoTimerState.Disabled:
             Disabled();
             break;
         case PomoTimerState.Work:
             Work();
             break;
         case PomoTimerState.Rest:
             Rest();
             break;
     }
 }
예제 #2
0
        public void OnPomoTimerChangeState_ColoursSetCorrectly(
            PomoTimerState state,
            TomatoColours.TomatoColourSet initialColourSet,
            TomatoColours.TomatoColourSet expectedColourSet)
        {
            _PomoViewModel.ColourSet = TomatoColours.Disabled;
            var pomoTimerStateChangeEventArgs = new PomoTimerStateChangeEventArgs(state);

            _MockPomoTimer.Raise(m => m.StateChanged += null, null, pomoTimerStateChangeEventArgs);

            Assert.That(_PomoViewModel.ColourSet, Is.EqualTo(expectedColourSet));
        }