示例#1
0
        public void DisplayInputWarning_DisplaysExpectedWarning_WithoutParameters()
        {
            // arrange
            var expected = "Invalid cell, A-J and 1-10 are allowed\r\n";

            // act
            _serviceUnderTests.DisplayInputWarning();

            // 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();
            }
        }