Esempio n. 1
0
        public void Board_InvalidStates_Finished()
        {
            //// ARRANGE
            var gameServiceMock = new Mock <ITwgeService>();
            var gameBoard       = new BoardContext(gameServiceMock.Object);

            gameBoard.Initialize();
            gameBoard.End();

            // ACT / ASSERT
            var cellCoordinate = new Coordinate('a', 1);

            Assert.Throws <InvalidOperationException>(() => gameBoard.Play(cellCoordinate, Cell.Marker.Circle));
            Assert.Throws <InvalidOperationException>(() => gameBoard.End());
        }
Esempio n. 2
0
        public void Board_State_DrawnToFinished_Success()
        {
            // ARRANGE
            var gameServiceMock = new Mock <ITwgeService>();
            var gameBoard       = new BoardContext(gameServiceMock.Object);

            gameBoard.Initialize();

            // ACT
            gameBoard.End();

            // ASSERT
        }