1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-28 02:37:40 +00:00
Sonarr/NzbDrone.Core.Test/Fixtures.cs

56 lines
1.3 KiB
C#
Raw Normal View History

2010-09-30 06:59:00 +00:00
using System;
using System.IO;
using MbUnit.Framework;
using NLog;
using NLog.Config;
using System.Linq;
2010-09-30 06:59:00 +00:00
namespace NzbDrone.Core.Test
{
[AssemblyFixture]
public class Fixtures
{
[TearDown]
public void TearDown()
{
foreach (var file in Directory.GetFiles(Directory.GetCurrentDirectory(), "*.db", SearchOption.AllDirectories))
2010-09-30 06:59:00 +00:00
{
try
{
File.Delete(file);
2010-09-30 06:59:00 +00:00
}
catch
{ }
}
}
2010-09-30 06:59:00 +00:00
[FixtureTearDown]
public void FixtureTearDown()
{
foreach (var file in Directory.GetFiles(Directory.GetCurrentDirectory(), "*.*", SearchOption.AllDirectories))
{
try
{
File.Delete(file);
}
catch { }
2010-09-30 06:59:00 +00:00
}
}
2010-10-02 19:01:43 +00:00
[SetUp]
public void SetUp()
2010-10-02 19:01:43 +00:00
{
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);
}
2010-10-02 19:01:43 +00:00
}
2010-09-30 06:59:00 +00:00
}
}