Ejemplo n.º 1
0
        public void AfterTest(TestDetails details)
        {
            Console.WriteLine("----- Beginning Duality environment teardown -----");

            // Remove NUnit Console logs
            Log.RemoveGlobalOutput(this.consoleLogOutput);
            this.consoleLogOutput = null;

            if (this.dummyWindow != null)
            {
                ContentProvider.ClearContent();
                ContentProvider.DisposeDefaultContent();
                this.dummyWindow.Dispose();
                this.dummyWindow = null;
            }

            // Save local testing memory. As this uses Duality serializers,
            // it needs to be done before terminating Duality.
            if (TestContext.CurrentContext.Result.Status == TestStatus.Passed && !System.Diagnostics.Debugger.IsAttached)
            {
                Serializer.WriteObject(TestHelper.LocalTestMemory, TestHelper.LocalTestMemoryFilePath, typeof(XmlSerializer));
            }

            DualityApp.Terminate();
            Environment.CurrentDirectory = this.oldEnvDir;

            Console.WriteLine("----- Duality environment teardown complete -----");
        }
Ejemplo n.º 2
0
        public void AfterTest(TestDetails details)
        {
            Console.WriteLine("----- Beginning Duality environment teardown -----");

            // Remove NUnit Console logs
            Log.Game.RemoveOutput(this.consoleLogOutput);
            Log.Core.RemoveOutput(this.consoleLogOutput);
            Log.Editor.RemoveOutput(this.consoleLogOutput);
            this.consoleLogOutput = null;

            if (this.dummyWindow != null)
            {
                ContentProvider.ClearContent();
                ContentProvider.DisposeDefaultContent();
                this.dummyWindow.Dispose();
                this.dummyWindow = null;
            }
            DualityApp.Terminate();
            Environment.CurrentDirectory = this.oldEnvDir;

            // Save local testing memory
            if (TestContext.CurrentContext.Result.Status == TestStatus.Passed && !System.Diagnostics.Debugger.IsAttached)
            {
                Formatter.WriteObject(TestHelper.LocalTestMemory, TestHelper.LocalTestMemoryFilePath, FormattingMethod.Xml);
            }

            Console.WriteLine("----- Duality environment teardown complete -----");
        }
Ejemplo n.º 3
0
        public void AfterTest(TestDetails details)
        {
            Console.WriteLine("----- Beginning Duality environment teardown -----");

            if (this.dummyWindow != null)
            {
                ContentProvider.ClearContent();
                ContentProvider.DisposeDefaultContent();
                this.dummyWindow.Dispose();
                this.dummyWindow = null;
            }
            DualityApp.Terminate();
            Environment.CurrentDirectory = this.oldEnvDir;

            Console.WriteLine("----- Duality environment teardown complete -----");
        }
Ejemplo n.º 4
0
        public void AfterTest(TestDetails details)
        {
            Console.WriteLine("----- Beginning Duality Editor environment teardown -----");

            // Remove NUnit Console logs
            Log.RemoveGlobalOutput(this.consoleLogOutput);
            this.consoleLogOutput = null;

            if (this.dummyWindow != null)
            {
                ContentProvider.ClearContent();
                ContentProvider.DisposeDefaultContent();
                this.dummyWindow.Dispose();
                this.dummyWindow = null;
            }

            DualityEditorApp.Terminate(false);
            Environment.CurrentDirectory = this.oldEnvDir;

            Console.WriteLine("----- Duality Editor environment teardown complete -----");
        }