1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 17:47:08 +00:00

fixed broken tests.

This commit is contained in:
Keivan Beigi 2013-06-27 17:12:50 -07:00
parent 64df2229d6
commit 02c175950b
3 changed files with 7 additions and 3 deletions

View file

@ -17,7 +17,6 @@ public void SetUp()
{ {
WithTempAsAppPath(); WithTempAsAppPath();
//Reset config file
var configFile = Mocker.Resolve<IAppDirectoryInfo>().GetConfigPath(); var configFile = Mocker.Resolve<IAppDirectoryInfo>().GetConfigPath();
if (File.Exists(configFile)) if (File.Exists(configFile))

View file

@ -23,6 +23,13 @@ protected void UseRealHttp()
{ {
Mocker.SetConstant<IHttpProvider>(new HttpProvider()); Mocker.SetConstant<IHttpProvider>(new HttpProvider());
} }
protected void UseRealDisk()
{
Mocker.SetConstant<IDiskProvider>(new DiskProvider());
WithTempAsAppPath();
}
} }
public abstract class CoreTest<TSubject> : CoreTest where TSubject : class public abstract class CoreTest<TSubject> : CoreTest where TSubject : class

View file

@ -74,7 +74,6 @@ private string VirtualPath
[SetUp] [SetUp]
public void TestBaseSetup() public void TestBaseSetup()
{ {
WithTempAsAppPath();
GetType().IsPublic.Should().BeTrue("All Test fixtures should be public to work in mono."); GetType().IsPublic.Should().BeTrue("All Test fixtures should be public to work in mono.");
@ -88,7 +87,6 @@ public void TestBaseSetup()
MockedRestProvider = new Mock<RestProvider>(); MockedRestProvider = new Mock<RestProvider>();
Directory.CreateDirectory(TempFolder); Directory.CreateDirectory(TempFolder);
} }