diff --git a/NzbDrone.Common.Test/EnviromentProviderTest.cs b/NzbDrone.Common.Test/EnviromentProviderTest.cs index 68da7c761..c5f43cc2c 100644 --- a/NzbDrone.Common.Test/EnviromentProviderTest.cs +++ b/NzbDrone.Common.Test/EnviromentProviderTest.cs @@ -11,12 +11,6 @@ namespace NzbDrone.Common.Test { readonly EnviromentProvider enviromentController = new EnviromentProvider(); - [Test] - public void Is_user_interactive_should_be_false() - { - enviromentController.IsUserInteractive.Should().BeTrue(); - } - [Test] public void StartupPath_should_not_be_empty() { diff --git a/NzbDrone.Core.Test/CentralDispatchTest.cs b/NzbDrone.Core.Test/CentralDispatchFixture.cs similarity index 98% rename from NzbDrone.Core.Test/CentralDispatchTest.cs rename to NzbDrone.Core.Test/CentralDispatchFixture.cs index e9abaff52..937b25378 100644 --- a/NzbDrone.Core.Test/CentralDispatchTest.cs +++ b/NzbDrone.Core.Test/CentralDispatchFixture.cs @@ -16,7 +16,7 @@ namespace NzbDrone.Core.Test { [TestFixture] // ReSharper disable InconsistentNaming - class CentralDispatchTest : TestBase + class CentralDispatchFixture : TestBase { readonly IList indexers = typeof(CentralDispatch).Assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(IndexerBase))).ToList(); readonly IList jobs = typeof(CentralDispatch).Assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IJob))).ToList(); diff --git a/NzbDrone.Core.Test/Framework/TestBase.cs b/NzbDrone.Core.Test/Framework/TestBase.cs index b589fbde8..351c9cf0d 100644 --- a/NzbDrone.Core.Test/Framework/TestBase.cs +++ b/NzbDrone.Core.Test/Framework/TestBase.cs @@ -14,8 +14,6 @@ namespace NzbDrone.Core.Test.Framework { static TestBase() { - InitLogging(); - var oldDbFiles = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.sdf", SearchOption.AllDirectories); foreach (var file in oldDbFiles) { @@ -47,6 +45,8 @@ namespace NzbDrone.Core.Test.Framework [SetUp] public virtual void SetupBase() { + InitLogging(); + ExceptionVerification.Reset(); if (Directory.Exists(TempFolder)) { diff --git a/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj b/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj index 84d29a96f..1dbe42f98 100644 --- a/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj +++ b/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj @@ -99,7 +99,7 @@ - + diff --git a/NzbDrone.Test.Common/LoggingTest.cs b/NzbDrone.Test.Common/LoggingTest.cs index df68f0479..5c8a13748 100644 --- a/NzbDrone.Test.Common/LoggingTest.cs +++ b/NzbDrone.Test.Common/LoggingTest.cs @@ -1,6 +1,5 @@ using NLog; using NLog.Config; -using NUnit.Framework; using NzbDrone.Common; namespace NzbDrone.Test.Common @@ -9,10 +8,14 @@ namespace NzbDrone.Test.Common { protected static void InitLogging() { - LogConfiguration.RegisterConsoleLogger(LogLevel.Trace); - LogConfiguration.RegisterUdpLogger(); + if (LogManager.Configuration == null || LogManager.Configuration is XmlLoggingConfiguration) + { + LogManager.Configuration = new LoggingConfiguration(); + LogConfiguration.RegisterConsoleLogger(LogLevel.Trace); + LogConfiguration.RegisterUdpLogger(); - RegisterExceptionVerification(); + RegisterExceptionVerification(); + } } private static void RegisterExceptionVerification()