mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
fixed some broken tests.
This commit is contained in:
29
NzbDrone.Core.Test/Framework/CoreTestTSubject.cs
Normal file
29
NzbDrone.Core.Test/Framework/CoreTestTSubject.cs
Normal file
@@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user