Esempio n. 1
0
        public void If_I_Miss_Seven_Times_I_Lose()
        {
            //Arrange
            var game = new GallowGame(new Word("teste"));
            game.Try('h');
            game.Try('p');
            game.Try('x');
            game.Try('a');
            game.Try('b');
            game.Try('i');
            game.Try('o');

            //Act
            var result = game.GetResult();

            //Assert
            Assert.That(result, Is.EqualTo(GallowsGameState.Lose));
        }
Esempio n. 2
0
        public void When_All_Letters_Are_Correct_I_Won()
        {
            //Arrange
            var game = new GallowGame(new Word("teste"));
            game.Try('t');
            game.Try('e');
            game.Try('s');

            //Act
            var result = game.GetResult();

            //Assert
            Assert.That(result, Is.EqualTo(GallowsGameState.Win));
        }
Esempio n. 3
0
        public void While_Some_Letters_Were_Not_Discovered_I_Did_Not_Win()
        {
            //Arrange
            var game = new GallowGame(new Word("teste"));
            game.Try('t');
            game.Try('e');

            //Act
            var result = game.GetResult();

            //Assert
            Assert.That(result, Is.EqualTo(GallowsGameState.Playing));
        }