Example #1
0
        public void TestMethod3()
        {
            HangManGame game = new HangManGame();

            Assert.IsTrue(game.CurrentWord.Equals("sadism"));
            Assert.IsTrue(game.CurrentWordShown.Equals("______"));

            Assert.IsTrue(game.GuessLetter("S"));
            Assert.IsTrue(game.CurrentWordShown.Equals("s___s_"));

            Assert.IsTrue(game.GuessLetter("d"));
            Assert.IsTrue(game.CurrentWordShown.Equals("s_d_s_"));

            Assert.IsTrue(game.GuessLetter("A"));
            Assert.IsTrue(game.CurrentWordShown.Equals("sad_s_"));
            Assert.IsTrue(game.CurrentWordShown.ToUpper().Equals("SAD_S_"));

            Assert.IsTrue(game.GuessLetter("m"));
            Assert.IsTrue(game.CurrentWordShown.Equals("sad_sm"));

            Assert.IsTrue(game.GuessLetter("i"));
            Assert.IsTrue(game.CurrentWordShown.Equals("sadism"));

            game.NextWord();

            Assert.IsTrue(game.CurrentWord.Equals("masochism"));
            Assert.IsTrue(game.CurrentWordShown.Equals("_________"));
        }
Example #2
0
        public void TestMethod1()
        {
            HangManGame game = new HangManGame();

            Assert.IsTrue(game.CurrentWord.Equals("sadism"));

            Assert.IsTrue(game.GuessLetter("A"));
            Assert.IsFalse(game.GuessLetter("Z"));
        }
Example #3
0
        public void TestMethod2()
        {
            HangManGame game = new HangManGame();

            Assert.IsTrue(game.CurrentWord.Equals("sadism"));

            game.NextWord();

            Assert.IsTrue(game.CurrentWord.Equals("masochism"));

            Assert.IsTrue(game.GuessLetter("S"));
            Assert.IsFalse(game.GuessLetter("j"));
        }