Example #1
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>();
        }
Example #2
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();
        }