예제 #1
0
        public void AskQuestion_displayMessageOnConsole()
        {
            //arrange
            var cs       = new MockedConsoleService();
            var sit      = new AskQuestionService(cs);
            var expected = "szyna kolejowa";

            //act
            sit.AskQuestion(expected);

            //assert
            Assert.Equal(expected, cs.DisplayText);
        }
예제 #2
0
        public void AskQuestion_returnsProper(char response, bool expected)
        {
            //arrange
            var cs  = new MockedConsoleService();
            var sit = new AskQuestionService(cs);

            cs.Response = response;


            //act
            var actual = sit.AskQuestion("szyna kolejowa");

            //assert
            Assert.Equal(expected, actual);
        }