public void ShouldAct() { // Arrange MockCountdownTimerElapsedAction nextAction = new MockCountdownTimerElapsedAction.Builder().Act().Build(); MockCountdownTimer mockCountdownTimer = new MockCountdownTimer.Builder().Build(); CountdownTimerElapsedAction subject = new CountdownTimerElapsedAction(nextAction); // Act subject.Act(mockCountdownTimer); // Assert nextAction.AssertActInvokedWith(mockCountdownTimer); }
public void ShouldNextActWhenNotFinished() { // Arrange MockCountdownTimerElapsedAction nextAction = new MockCountdownTimerElapsedAction.Builder().Act().Build(); MockCountdownState mockCountdownState = new MockCountdownState.Builder().Finished(Bool.False).Build(); MockCountdownTimer mockCountdownTimer = new MockCountdownTimer.Builder().CountdownState(mockCountdownState).Build(); CountdownTimerElapsedAction_FinishedGuard subject = new CountdownTimerElapsedAction_FinishedGuard(nextAction); // Act subject.Act(mockCountdownTimer); // Assert nextAction.AssertActInvokedWith(mockCountdownTimer); }
public void ShouldNextActAndInvoke() { // Arrange MockCountdownTimerElapsedAction nextAction = new MockCountdownTimerElapsedAction.Builder().Act().Build(); MockCountdownTimer mockCountdownTimer = new MockCountdownTimer.Builder().Invoke().Build(); CountdownTimerElapsedAction_Update subject = new CountdownTimerElapsedAction_Update(nextAction); // Act subject.Act(mockCountdownTimer); // Assert nextAction.AssertActInvokedWith(mockCountdownTimer); mockCountdownTimer.AssertInvokeInvokedWith(TimerProgress.More); }