Ejemplo n.º 1
0
        public void ShouldInvokedNextAction()
        {
            //Arrange
            FakeDifficultySelectionAction nextAction = new FakeDifficultySelectionAction.Builder().Act(null).Build();
            DifficultySelectionAction     subject    = new DifficultySelectionAction(nextAction);

            //Act
            subject.Response("");

            //Assert
            nextAction.AssertActInvoked();
        }
Ejemplo n.º 2
0
        public void ShouldReturnCorrectModeGivenInput()
        {
            //Arrange
            FakeDifficultySelectionAction   nextAction = new FakeDifficultySelectionAction.Builder().Build();
            MediumDifficultySelectionAction subject    = new MediumDifficultySelectionAction(nextAction);

            //Act
            ISelectMoveAction selectMoveAction = subject.Act("2");

            //Assert
            selectMoveAction.Should().BeOfType <MediumComputerSelectMoveAction>();
        }
Ejemplo n.º 3
0
        public void ShouldInvokeNextActionIfNotHandled()
        {
            //Arrange
            FakeSelectMoveAction            fakeSelectMoveAction = new FakeSelectMoveAction.Builder().Build();
            FakeDifficultySelectionAction   nextAction           = new FakeDifficultySelectionAction.Builder().Act(fakeSelectMoveAction).Build();
            MediumDifficultySelectionAction subject = new MediumDifficultySelectionAction(nextAction);

            //Act
            subject.Act("3");

            //Assert
            nextAction.AssertActInvoked();
        }