1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 04:22:30 +01:00
Radarr/NzbDrone.Core.Test/Fixtures.cs
2011-04-23 12:59:06 -07:00

60 lines
1.4 KiB
C#

using System;
using System.IO;
using MbUnit.Framework;
using NLog;
using NLog.Config;
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
{
}
}
}
[SetUp]
public void SetUp()
{
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);
}
}
}
}