1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-30 20:05:41 +00:00
Radarr/NzbDrone.Core.Test/Framework/TestBase.cs

45 lines
1 KiB
C#
Raw Normal View History

using System.IO;
using NUnit.Framework;
using NzbDrone.Core.Providers.Jobs;
namespace NzbDrone.Core.Test.Framework
{
public class TestBase
2011-05-22 16:53:21 +00:00
// ReSharper disable InconsistentNaming
{
[SetUp]
public void Setup()
{
ExceptionVerification.Reset();
if (Directory.Exists(TempFolder))
{
Directory.Delete(TempFolder, true);
}
}
[TearDown]
public void TearDown()
{
JobProvider.Queue.Clear();
2011-06-02 21:06:46 +00:00
ExceptionVerification.AssertNoUnexcpectedLogs();
}
protected string TempFolder
{
get { return Path.Combine(Directory.GetCurrentDirectory(), "_temp"); }
}
protected string GetTestFilePath(string fileName)
{
return Path.Combine(@".\Files\", fileName);
}
protected string ReadTestFile(string fileName)
{
return File.ReadAllText(GetTestFilePath(fileName));
}
}
}