public void CountdownState_ShouldReturnAccurateState() { //Arrange //Arrange MockCountdownState mockCountdownState = new MockCountdownState.Builder().Build(); MockCountdownTimerElapsedAction mockCountdownTimerElapsedAction = new MockCountdownTimerElapsedAction.Builder().Build(); MockTimerBookEnd mockTimerBookEnd = new MockTimerBookEnd.Builder().Build(); MockCountdownTracker mockCountdownTracker = new MockCountdownTracker.Builder().CountdownState(mockCountdownState).Build(); CountdownTimer subject = new TestCountdownTimer(mockCountdownTimerElapsedAction, mockTimerBookEnd, mockCountdownTracker); //Act ICountdownState actual = subject.CountdownState(); //Assert actual.Should().Be(mockCountdownState); }
public void ShouldReturnComposedCountdownState() { //Arrange Number expected = new NumberOf(10); Number events = new NumberOf(10); MockCounter mockCounter = new MockCounter.Builder().Value(expected).Build(); MockCountdownTime mockCountdownTime = new MockCountdownTime.Builder().Build(); CountdownTracker subject = new PrivateCtor <CountdownTracker>(mockCounter, events, mockCountdownTime); //Act ICountdownState countdownState = subject.CountdownState(); //Assert ((bool)countdownState.Finished()).Should().BeFalse(); ((bool)countdownState.Last()).Should().BeTrue(); }