Exemplo n.º 1
0
        public void TestTesterHelperQuestionDefaultValue()
        {
            var tester = new TesterHelperQuestion();

            tester.SetInputs(new[] { string.Empty });

            var question = new BaseQuestion("What's your name?", "What?");

            Assert.AreEqual("What?", (string)tester.Ask(question));
            Assert.AreEqual("What's your name?", tester.GetDisplay());
        }
Exemplo n.º 2
0
        public void TestTesterHelperQuestion()
        {
            var tester = new TesterHelperQuestion();

            tester.SetInputs(new[] { "menghanyu" });

            var question = new BaseQuestion("What's your name?", "What?");

            Assert.AreEqual("menghanyu", (string)tester.Ask(question));
            Assert.AreEqual("What's your name?", tester.GetDisplay());
        }