Esempio n. 1
0
        public void ShouldAct()
        {
            // Arrange
            TimerProgress     timeProgress            = TimerProgress.Last;
            MockMainForm      mockMainForm            = new MockMainForm.Builder().Build();
            MockCountdownTime mockCountdownTime       = new MockCountdownTime.Builder().Build();
            MockCountdownTimerUpdateAction nextAction = new MockCountdownTimerUpdateAction.Builder().Act().Build();

            ShortBreakTimerUpdateAction_TimerFinished subject = new ShortBreakTimerUpdateAction_TimerFinished(nextAction);

            // Act
            subject.Act(mockMainForm, mockCountdownTime, timeProgress);

            // Assert
            nextAction.AssertActInvokedWith(mockMainForm, mockCountdownTime, timeProgress);
        }
Esempio n. 2
0
        public void ShouldHaveExpectedOrder()
        {
            //Arrange
            ChainValidation chainValidation = new ChainValidation()
                                              .Add <CountdownTimerUpdateAction_GuardAgainstMore>()
                                              .Add <CountdownTimerUpdateAction_FinishedForeColor>()
                                              .Add <CountdownTimerUpdateAction_RemainingTime>()
                                              .Add <CountdownTimerUpdateAction_EnableSessionStart>()
                                              .Add <CountdownTimerUpdateAction_ShowSessionStart>()
                                              .Add <CountdownTimerUpdateAction_HideShortBreakStart>()
                                              .Add <CountdownTimerUpdateAction_ShowShortBreakOver>()
                                              .Add <CountdownTimerUpdateAction_FormToTop>()
                                              .Add <NoOpUpdateAction>();

            //Act
            ShortBreakTimerUpdateAction_TimerFinished subject = new ShortBreakTimerUpdateAction_TimerFinished();

            //Assert
            chainValidation.AssertExpectedChain(subject);
        }