Пример #1
0
        public void TestIfNewConsoleRendererIsCreatedWithEngine()
        {
            string testFieldSize = "6";

            Engine.FieldSizeUnitTestSetter = new StringReader(testFieldSize);
            Engine.StartMenu.IsStartGameChosen = true;
            Engine gameEngine = Engine.Instance;

            ConsoleRenderer testRenderer = new ConsoleRenderer(gameEngine);
            Assert.AreEqual(testRenderer is ConsoleRenderer, true, string.Format("Expected testRenderer is ConsoleRenderer. Received {0}", 1));
        }
Пример #2
0
        public void TestIfDrawGameOver()
        {
            int moves = 6;
            string testFieldSize = "6";

            Engine.FieldSizeUnitTestSetter = new StringReader(testFieldSize);
            Engine.StartMenu.IsStartGameChosen = true;
            Engine gameEngine = Engine.Instance;
            ConsoleRenderer cr = new ConsoleRenderer(gameEngine);

            cr.DrawGameOver(moves);
        }