Ejemplo n.º 1
0
        public void IfNumberOfIncorrectGuessesIsEleven_ReturnGameOver()
        {
            _hangerManGame.GuessResult('a');
            _hangerManGame.GuessResult('e');
            _hangerManGame.GuessResult('r');
            _hangerManGame.GuessResult('t');
            _hangerManGame.GuessResult('y');
            _hangerManGame.GuessResult('u');
            _hangerManGame.GuessResult('i');
            _hangerManGame.GuessResult('o');
            _hangerManGame.GuessResult('q');
            _hangerManGame.GuessResult('d');
            _hangerManGame.GuessResult('v');
            _hangerManGame.GuessResult('x');
            _hangerManGame.GuessResult('z');

            var status = _hangerManGame.Status();

            Assert.Equal(GameStatus.GameOver, status);
        }
Ejemplo n.º 2
0
        public void WordWithMultipleOfSameLetter()
        {
            wordProvider.Setup(x => x.Word).Returns("book");
            var hangermanGame = new HangerManGame(wordProvider.Object);

            hangermanGame.GuessResult('b');
            hangermanGame.GuessResult('o');
            hangermanGame.GuessResult('k');

            Assert.Equal(GameStatus.Won, hangermanGame.Status());
        }