mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
added parallel test execution support for ncrunch.
This commit is contained in:
parent
130be58f8c
commit
ff09773a3b
13 changed files with 70 additions and 23 deletions
|
@ -31,7 +31,7 @@ namespace NzbDrone.Test.Common
|
|||
protected Mock<RestProvider> MockedRestProvider { get; private set; }
|
||||
|
||||
|
||||
protected string VirtualPath
|
||||
private string VirtualPath
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -42,9 +42,15 @@ namespace NzbDrone.Test.Common
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
protected string TempFolder { get; private set; }
|
||||
|
||||
[SetUp]
|
||||
public void TestBaseSetup()
|
||||
{
|
||||
|
||||
TempFolder = Path.Combine(Directory.GetCurrentDirectory(), "_temp_" + DateTime.Now.Ticks);
|
||||
|
||||
MockedRestProvider = new Mock<RestProvider>();
|
||||
ReportingService.RestProvider = MockedRestProvider.Object;
|
||||
ReportingService.SetupExceptronDriver();
|
||||
|
@ -62,6 +68,18 @@ namespace NzbDrone.Test.Common
|
|||
public void TestBaseTearDown()
|
||||
{
|
||||
_mocker = null;
|
||||
|
||||
try
|
||||
{
|
||||
if (Directory.Exists(TempFolder))
|
||||
{
|
||||
Directory.Delete(TempFolder, true);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void WithStrictMocker()
|
||||
|
@ -80,12 +98,6 @@ namespace NzbDrone.Test.Common
|
|||
.Returns(VirtualPath);
|
||||
}
|
||||
|
||||
|
||||
protected string TempFolder
|
||||
{
|
||||
get { return Path.Combine(Directory.GetCurrentDirectory(), "temp"); }
|
||||
}
|
||||
|
||||
protected string GetTestFilePath(string fileName)
|
||||
{
|
||||
return Path.Combine(@".\Files\", fileName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue