fixed some broken tests.

This commit is contained in:
kay.one
2013-01-19 10:19:29 -08:00
parent fd8ad73476
commit edf7cc678d
13 changed files with 185 additions and 259 deletions
+3 -3
View File
@@ -24,13 +24,13 @@ namespace NzbDrone.Core.Test.Framework
catch { }
}
//Delete App_data folder
/* //Delete App_data folder
var appData = new EnvironmentProvider().GetAppDataPath();
if (Directory.Exists(appData))
{
Directory.Delete(appData, true);
}
//Directory.Delete(appData, true);
}*/
TestDbHelper.CreateDataBaseTemplate();
}
@@ -0,0 +1,29 @@
namespace NzbDrone.Core.Test.Framework
{
public abstract class CoreTest<TSubject> : CoreTest where TSubject : class
{
private TSubject _subject;
protected TSubject Subject
{
get
{
if (_subject == null)
{
_subject = Mocker.Resolve<TSubject>();
}
return _subject;
}
}
protected void InitiateSubject()
{
_subject = Mocker.Resolve<TSubject>();
}
}
}