diff --git a/test/docfx.Test/DocfxTest.cs b/test/docfx.Test/DocfxTest.cs index 1fd86b1d350..14f6e0a8e35 100644 --- a/test/docfx.Test/DocfxTest.cs +++ b/test/docfx.Test/DocfxTest.cs @@ -13,7 +13,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Xunit; -using Xunit.Sdk; namespace Microsoft.Docs.Build { @@ -26,12 +25,6 @@ public static class DocfxTest static DocfxTest() { - Environment.SetEnvironmentVariable("DOCFX_APPDATA_PATH", Path.GetFullPath("appdata")); - Environment.SetEnvironmentVariable("DOCFX_GLOBAL_CONFIG_PATH", Path.GetFullPath("docfx.test.yml")); - - Log.ForceVerbose = true; - TestUtility.MakeDebugAssertThrowException(); - AppData.GetCachePath = () => t_cachePath.Value; GitUtility.GitRemoteProxy = remote => { diff --git a/test/docfx.Test/FodyWeavers.xml b/test/docfx.Test/FodyWeavers.xml new file mode 100644 index 00000000000..4b7ad15cfd6 --- /dev/null +++ b/test/docfx.Test/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/docfx.Test/ModuleInitializer.cs b/test/docfx.Test/ModuleInitializer.cs new file mode 100644 index 00000000000..c5de6ccccbe --- /dev/null +++ b/test/docfx.Test/ModuleInitializer.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.IO; + +namespace Microsoft.Docs.Build +{ + public static class ModuleInitializer + { + public static void Initialize() + { + Environment.SetEnvironmentVariable("DOCFX_APPDATA_PATH", Path.GetFullPath("appdata")); + Environment.SetEnvironmentVariable("DOCFX_GLOBAL_CONFIG_PATH", Path.GetFullPath("docfx.test.yml")); + + Log.ForceVerbose = true; + TestUtility.MakeDebugAssertThrowException(); + } + } +} diff --git a/test/docfx.Test/docfx.Test.csproj b/test/docfx.Test/docfx.Test.csproj index 2cdeb763d01..f98f1fd7d8e 100644 --- a/test/docfx.Test/docfx.Test.csproj +++ b/test/docfx.Test/docfx.Test.csproj @@ -2,10 +2,13 @@ netcoreapp2.2 + false + +