Beispiel #1
0
        public void TestingnewBoard_moveCountToZero()
        {
            //Arrange
            IUI ui = new MockUI();
            GameLogic GLnewgame = new GameLogic(ui);
            GLnewgame.CreatePlayers();
            int expectedMoveCount = 0;

            //Act
            int actualMoveCount;
            actualMoveCount = GLnewgame.GetMoveCount();

            //Assert
            Assert.AreEqual(expectedMoveCount, actualMoveCount);
        }
Beispiel #2
0
        public void TestingCreatePlayers()
        {
            //Arrange
            IUI ui = new MockUI();
            GameLogic GLnewgame = new GameLogic(ui);
            GLnewgame.CreatePlayers();

            //Act
            Player ActualPlayer1, ActualPlayer2;
            ActualPlayer1 = GLnewgame.GetPlayer1();
            ActualPlayer2 = GLnewgame.GetPlayer2();

            //Assert
            Assert.IsInstanceOf<Player>(ActualPlayer1);
            Assert.IsInstanceOf<Player>(ActualPlayer2);
        }