public void ShouldReturnHumanFirstOrderGivenMatchingInput() { //Arrange FakePlayerTurnsOrderAction fakePlayerTurnsOrderAction = new FakePlayerTurnsOrderAction.Builder().Build(); HumanFirstPlayerTurn subject = new HumanFirstPlayerTurn(fakePlayerTurnsOrderAction); //Act IPlayerOrder actual = subject.Response("1"); //Assert actual.Should().BeOfType <HumanFirstOrder>(); }
public void ShouldReturnTieStatus() { //Arrange FakePlayerTurnsOrderAction fakePlayerTurnsOrderAction = new FakePlayerTurnsOrderAction.Builder().Response(null).Build(); PlayerTurnsOrderAction subject = new PlayerTurnsOrderAction(fakePlayerTurnsOrderAction); //Act subject.Response(""); //Assert fakePlayerTurnsOrderAction.AssertResponseInvoked(); }
public void ShouldReturnInvokeNextGivenNotHandled() { //Arrange FakePlayerOrder fakePlayerOrder = new FakePlayerOrder.Builder().Build(); FakePlayerTurnsOrderAction fakePlayerTurnsOrderAction = new FakePlayerTurnsOrderAction.Builder().Response(fakePlayerOrder).Build(); HumanFirstPlayerTurn subject = new HumanFirstPlayerTurn(fakePlayerTurnsOrderAction); //Act IPlayerOrder actual = subject.Response("2"); //Assert actual.Should().Be(fakePlayerOrder); }