Esempio n. 1
0
        public void PlayerSeesEmptyGridAtBeginningOfTheGame()
        {
            ViewGridResponse viewGridResponse = _viewGrid.Execute();

            Assert.AreEqual(new[]
            {
                Blank, Blank, Blank,
                Blank, Blank, Blank,
                Blank, Blank, Blank
            }, viewGridResponse.Grid);
        }
Esempio n. 2
0
        public void PlayerOCanNotGoFirst()
        {
            _placePiece.Execute(new PlacePieceRequest {
                Position = 4, Piece = _moveO
            });

            ViewGridResponse viewGridResponse = _viewGrid.Execute();

            Assert.AreEqual(new[]
            {
                Blank, Blank, Blank,
                Blank, Blank, Blank,
                Blank, Blank, Blank
            }, viewGridResponse.Grid);
        }
Esempio n. 3
0
        public void PlayerXSeesTheirPieceOnTheGridAfterPlacingIt()
        {
            _placePiece.Execute(new PlacePieceRequest {
                Position = 4, Piece = _moveX
            });

            ViewGridResponse viewGridResponse = _viewGrid.Execute();

            Assert.AreEqual(new[]
            {
                Blank, Blank, Blank,
                Blank, X, Blank,
                Blank, Blank, Blank
            }, viewGridResponse.Grid);
        }
Esempio n. 4
0
        public void PlayerOCantPlacePieceOnTopOfX()
        {
            _placePiece.Execute(new PlacePieceRequest {
                Position = 6, Piece = _moveX
            });
            _placePiece.Execute(new PlacePieceRequest {
                Position = 6, Piece = _moveO
            });

            ViewGridResponse viewGridResponse = _viewGrid.Execute();

            Assert.AreEqual(new[]
            {
                Blank, Blank, Blank,
                Blank, Blank, Blank,
                X, Blank, Blank
            }, viewGridResponse.Grid);
        }
Esempio n. 5
0
        public void PlayerOCanGoSecond()
        {
            _placePiece.Execute(new PlacePieceRequest {
                Position = 4, Piece = _moveX
            });
            _placePiece.Execute(new PlacePieceRequest {
                Position = 5, Piece = _moveO
            });

            ViewGridResponse viewGridResponse = _viewGrid.Execute();

            Assert.AreEqual(new[]
            {
                Blank, Blank, Blank,
                Blank, X, O,
                Blank, Blank, Blank
            }, viewGridResponse.Grid);
        }