예제 #1
0
        public void DisplayRetryWarning_DisplaysExpectedWarning_WithoutParameters()
        {
            // arrange
            var expected = "You already have shoot there, try something else\r\n";

            // act
            _serviceUnderTests.DisplayRetryWarning();

            // assert
            Assert.AreEqual(expected, _consoleOut);
        }
예제 #2
0
        public void PlayRound(string guess)
        {
            try
            {
                _gameState = _stateBuilder.Build(_gameState, guess);

                Show(_gameState);
            }
            catch (InvalidInputException)
            {
                _gameShowService.DisplayInputWarning();
            }
            catch (CellRepetitionException)
            {
                _gameShowService.DisplayRetryWarning();
            }
        }