public void ShouldInvokedNextAction() { //Arrange FakeDifficultySelectionAction nextAction = new FakeDifficultySelectionAction.Builder().Act(null).Build(); DifficultySelectionAction subject = new DifficultySelectionAction(nextAction); //Act subject.Response(""); //Assert nextAction.AssertActInvoked(); }
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>(); }
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(); }