diff options
Diffstat (limited to 'Test')
-rw-r--r-- | Test/UnitTests/TestBase.cs | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/Test/UnitTests/TestBase.cs b/Test/UnitTests/TestBase.cs index 0742fec..e015b23 100644 --- a/Test/UnitTests/TestBase.cs +++ b/Test/UnitTests/TestBase.cs @@ -9,8 +9,6 @@ namespace UnitTests { public class TestBase { - static bool firstRun = true; - public static string TempDir { get { string dir = new Uri (typeof(TestBase).Assembly.CodeBase).LocalPath; @@ -25,23 +23,19 @@ namespace UnitTests AddinManager.AddinLoaded += OnLoad; AddinManager.AddinUnloaded += OnUnload; - if (firstRun) { - if (Directory.Exists (TempDir)) - Directory.Delete (TempDir, true); - Directory.CreateDirectory (TempDir); - } + if (Directory.Exists (TempDir)) + Directory.Delete (TempDir, true); + Directory.CreateDirectory (TempDir); + + var configDir = Path.Combine(TempDir, "config"); + Directory.CreateDirectory(configDir); // Provide the current assembly as startup assembly, otherwise it will pick the // unit test runner as startup assembly - AddinManager.AddinEngine.Initialize (GetType().Assembly, null, TempDir, null, null); - - if (firstRun) - AddinManager.Registry.Update (new ConsoleProgressStatus (true)); - else - AddinManager.Registry.ResetConfiguration (); + AddinManager.AddinEngine.Initialize (GetType().Assembly, null, configDir, null, null); - firstRun = false; + AddinManager.Registry.Update (new ConsoleProgressStatus (true)); } [OneTimeTearDown] |