Пример #1
0
        public void Show_ShouldShowEmptyGrid_GivenEmptyGrid()
        {
            // arrange
            var expectedFirstScreen =
                "  1 2 3 4 5 6 7 8 9 10\r\n" +
                "A                     |\r\n" +
                "B                     |\r\n" +
                "C                     |\r\n" +
                "D                     |\r\n" +
                "E                     |\r\n" +
                "F                     |\r\n" +
                "G                     |\r\n" +
                "H                     |\r\n" +
                "I                     |\r\n" +
                "J                     |\r\n" +
                "  - - - - - - - - - - \r\n";
            var emptyGrid = BattleshipGameState.Empty(10).Grid;
            var empty     = new BattleshipGameState {
                Grid = emptyGrid
            };

            // act
            _serviceUnderTests.Show(empty);

            // assert
            Assert.AreEqual(expectedFirstScreen, _consoleOut);
        }
Пример #2
0
 private void Show(BattleshipGameState state)
 {
     _gameShowService.Show(state);
 }