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.
Lidarr/src/NzbDrone.Core.Test/Framework/DbTestCleanup.cs

27 lines
673 B

using System.IO;
using NUnit.Framework;
namespace NzbDrone.Core.Test
{
[SetUpFixture]
public class RemoveCachedDatabase
{
[OneTimeSetUp]
[OneTimeTearDown]
public void ClearCachedDatabase()
{
var mainCache = Path.Combine(TestContext.CurrentContext.TestDirectory, $"cached_Main.db");
if (File.Exists(mainCache))
{
File.Delete(mainCache);
}
var logCache = Path.Combine(TestContext.CurrentContext.TestDirectory, $"cached_Log.db");
if (File.Exists(logCache))
{
File.Delete(logCache);
}
}
}
}