You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sonarr/NzbDrone.Core.Test/Fixtures.cs

56 lines
1.3 KiB

using System;
using System.IO;
using MbUnit.Framework;
using NLog;
using NLog.Config;
using System.Linq;
namespace NzbDrone.Core.Test
{
[AssemblyFixture]
public class Fixtures
{
[TearDown]
public void TearDown()
{
foreach (var file in Directory.GetFiles(Directory.GetCurrentDirectory(), "*.db", SearchOption.AllDirectories))
{
try
{
File.Delete(file);
}
catch
{ }
}
}
[FixtureTearDown]
public void FixtureTearDown()
{
foreach (var file in Directory.GetFiles(Directory.GetCurrentDirectory(), "*.*", SearchOption.AllDirectories))
{
try
{
File.Delete(file);
}
catch { }
}
}
14 years ago
[SetUp]
public void SetUp()
14 years ago
{
try
{
LogManager.Configuration = new XmlLoggingConfiguration(Path.Combine(CentralDispatch.AppPath, "log.config"), false);
LogManager.ThrowExceptions = true;
}
catch (Exception e)
{
Console.WriteLine("Unable to configure logging. " + e);
}
14 years ago
}
}
}