예제 #1
0
        public void ShouldReturnComputerFirstOrder()
        {
            //Arrange
            ComputerFirstPlayerTurn subject = new ComputerFirstPlayerTurn();

            //Act
            IPlayerOrder actual = subject.Response("");

            //Assert
            actual.Should().BeOfType <ComputerFirstOrder>();
        }
예제 #2
0
        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>();
        }
예제 #3
0
        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);
        }