Fixed broken tests

This commit is contained in:
kay.one 2011-11-07 23:01:52 -08:00
parent 390dfbdee8
commit b43397752e
5 changed files with 11 additions and 14 deletions

View File

@ -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()
{

View File

@ -16,7 +16,7 @@ namespace NzbDrone.Core.Test
{
[TestFixture]
// ReSharper disable InconsistentNaming
class CentralDispatchTest : TestBase
class CentralDispatchFixture : TestBase
{
readonly IList<Type> indexers = typeof(CentralDispatch).Assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(IndexerBase))).ToList();
readonly IList<Type> jobs = typeof(CentralDispatch).Assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IJob))).ToList();

View File

@ -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))
{

View File

@ -99,7 +99,7 @@
<Compile Include="JobTests\SeriesSearchJobTest.cs" />
<Compile Include="ProviderTests\SearchProviderTest_Season.cs" />
<Compile Include="ProviderTests\EventClientProviderTest.cs" />
<Compile Include="CentralDispatchTest.cs" />
<Compile Include="CentralDispatchFixture.cs" />
<Compile Include="ProviderTests\XbmcProviderTest.cs" />
<Compile Include="ProviderTests\DiskScanProviderTest.cs" />
<Compile Include="ProviderTests\EpisodeProviderTest_GetEpisodesByParseResult.cs" />

View File

@ -1,6 +1,5 @@
using NLog;
using NLog.Config;
using NUnit.Framework;
using NzbDrone.Common;
namespace NzbDrone.Test.Common
@ -9,11 +8,15 @@ namespace NzbDrone.Test.Common
{
protected static void InitLogging()
{
if (LogManager.Configuration == null || LogManager.Configuration is XmlLoggingConfiguration)
{
LogManager.Configuration = new LoggingConfiguration();
LogConfiguration.RegisterConsoleLogger(LogLevel.Trace);
LogConfiguration.RegisterUdpLogger();
RegisterExceptionVerification();
}
}
private static void RegisterExceptionVerification()
{