mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-29 19:28:27 -07:00
Refactored IntegrationTests to work with Nunit3 VS adapter.
This commit is contained in:
parent
2fa3873503
commit
71ecc96c70
36 changed files with 804 additions and 318 deletions
|
@ -90,14 +90,11 @@ namespace NzbDrone.Test.Common
|
|||
[SetUp]
|
||||
public void TestBaseSetup()
|
||||
{
|
||||
|
||||
GetType().IsPublic.Should().BeTrue("All Test fixtures should be public to work in mono.");
|
||||
|
||||
|
||||
|
||||
LogManager.ReconfigExistingLoggers();
|
||||
|
||||
TempFolder = Path.Combine(Directory.GetCurrentDirectory(), "_temp_" + DateTime.Now.Ticks);
|
||||
TempFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, "_temp_" + DateTime.Now.Ticks);
|
||||
|
||||
Directory.CreateDirectory(TempFolder);
|
||||
}
|
||||
|
@ -152,6 +149,16 @@ namespace NzbDrone.Test.Common
|
|||
TestFolderInfo = Mocker.GetMock<IAppFolderInfo>().Object;
|
||||
}
|
||||
|
||||
protected string GetTestPath(string path)
|
||||
{
|
||||
return Path.Combine(TestContext.CurrentContext.TestDirectory, Path.Combine(path.Split('/')));
|
||||
}
|
||||
|
||||
protected string ReadAllText(string path)
|
||||
{
|
||||
return File.ReadAllText(GetTestPath(path));
|
||||
}
|
||||
|
||||
protected string GetTempFilePath()
|
||||
{
|
||||
return Path.Combine(TempFolder, Path.GetRandomFileName());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue