コード例 #1
0
ファイル: GameTestBase.cs プロジェクト: rohitshe/Code
        protected static void RunGameTest(GameTestBase game)
        {
            game.CurrentTestContext = TestContext.CurrentContext;

            game.ScreenShotAutomationEnabled = !ForceInteractiveMode;

            GameTester.RunGameTest(game);

            var failedTests = new List <string>();

            if (game.ScreenShotAutomationEnabled)
            {
                foreach (var testName in game.FrameGameSystem.TestNames)
                {
                    if (!ImageTester.RequestImageComparisonStatus(testName))
                    {
                        failedTests.Add(testName);
                    }
                }
            }

            if (failedTests.Count > 0)
            {
                Assert.Fail($"Some image comparison tests failed: {string.Join(", ", failedTests.Select(x => x))}");
            }
        }
コード例 #2
0
ファイル: GameTestBase.cs プロジェクト: sonicviz/xenko
        protected static void RunGameTest(GameTestBase game)
        {
            game.CurrentTestContext = TestContext.CurrentContext;

            game.ScreenShotAutomationEnabled = !ForceInteractiveMode;

            GameTester.RunGameTest(game);

            if (game.ScreenShotAutomationEnabled)
            {
                Assert.IsTrue(ImageTester.RequestImageComparisonStatus(game.CurrentTestContext.Test.FullName), "The image comparison returned false.");
            }
        }
コード例 #3
0
        protected static void RunGameTest(GameTestBase game)
        {
            game.CurrentTestContext = TestContext.CurrentContext;

            game.ScreenShotAutomationEnabled = !ForceInteractiveMode;

            GameTester.RunGameTest(game);

            var failedTests = new List<string>();

            if (game.ScreenShotAutomationEnabled)
            {
                foreach (var testName in game.FrameGameSystem.TestNames)
                {
                    if (!ImageTester.RequestImageComparisonStatus(testName))
                        failedTests.Add(testName);
                }
            }

            if (failedTests.Count > 0)
                Assert.Fail($"Some image comparison tests failed: {string.Join(", ", failedTests.Select(x => x))}");
        }
コード例 #4
0
ファイル: GameTestBase.cs プロジェクト: h78hy78yhoi8j/xenko
        protected static void RunGameTest(GameTestBase game)
        {
            game.CurrentTestContext = TestContext.CurrentContext;

            game.ScreenShotAutomationEnabled = !ForceInteractiveMode;

            GameTester.RunGameTest(game);

            if (game.ScreenShotAutomationEnabled)
                Assert.IsTrue(ImageTester.RequestImageComparisonStatus(game.CurrentTestContext.Test.FullName), "The image comparison returned false.");
        }