Lidarr/NzbDrone.Core.Test/Framework/CoreTestTSubject.cs

30 lines
556 B
C#
Raw Normal View History

2013-01-19 18:19:29 +00:00
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>();
}
}
}