public void ShouldDisableLongBreak() { //Arrange MockEnabled mockEnabled = new MockEnabled.Builder().Disable().Build(); MockMainForm mockMainForm = new MockMainForm.Builder().LongBreakStartEnabled(mockEnabled).Build(); MockCountdownTimer mockCountdownTimer = new MockCountdownTimer.Builder().Build(); MockCountdownTimerStartAction nextAction = new MockCountdownTimerStartAction.Builder().Act().Build(); CountdownTimerStartAction_DisableLongBreakStart subject = new CountdownTimerStartAction_DisableLongBreakStart(nextAction); //Act subject.Act(mockMainForm, mockCountdownTimer); //Assert mockEnabled.Disable(); mockMainForm.AssertLongBreakStartEnabledInvoked(); nextAction.AssertActInvokedWith(mockMainForm, mockCountdownTimer); }
public void ShouldAct() { // Arrange TimerProgress timeProgress = TimerProgress.Last; MockEnabled mockEnabled = new MockEnabled.Builder().Enable().Build(); MockMainForm mockMainForm = new MockMainForm.Builder().ShortBreakStartEnabled(mockEnabled).Build(); MockCountdownTime mockCountdownTime = new MockCountdownTime.Builder().Build(); MockCountdownTimerUpdateAction nextAction = new MockCountdownTimerUpdateAction.Builder().Act().Build(); CountdownTimerUpdateAction_EnableShortBreakStart subject = new CountdownTimerUpdateAction_EnableShortBreakStart(nextAction); // Act subject.Act(mockMainForm, mockCountdownTime, timeProgress); // Assert nextAction.AssertActInvokedWith(mockMainForm, mockCountdownTime, timeProgress); mockMainForm.AssertShortBreakStartEnabledInvoked(); mockEnabled.AssertEnableInvoked(); }