Esempio n. 1
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))}");
            }
        }
Esempio n. 2
0
        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.");
            }
        }