1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2025-03-03 10:06:06 +00:00

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 @@ public class EnviromentProviderTest
{
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 @@ public class TestBase : LoggingTest
{
static TestBase()
{
InitLogging();
var oldDbFiles = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.sdf", SearchOption.AllDirectories);
foreach (var file in oldDbFiles)
{
@ -47,6 +45,8 @@ protected string VirtualPath
[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,10 +8,14 @@ public abstract class LoggingTest
{
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()