コード例 #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
ファイル: EngineTests.cs プロジェクト: huuuskyyy/Teamworks
        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);
        }