public void ShouldReturnComputerFirstOrder() { //Arrange ComputerFirstPlayerTurn subject = new ComputerFirstPlayerTurn(); //Act IPlayerOrder actual = subject.Response(""); //Assert actual.Should().BeOfType <ComputerFirstOrder>(); }
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 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); }