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; } }
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)); }