mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
splited jobprovider into jobrepo, jobcontroller, moved to object db.
This commit is contained in:
parent
97398f604b
commit
40f3a8663d
38 changed files with 635 additions and 634 deletions
|
@ -8,6 +8,23 @@ using NzbDrone.Core.Datastore;
|
|||
namespace NzbDrone.Core.Test.Framework
|
||||
{
|
||||
|
||||
|
||||
public abstract class RepositoryTest<TRepository, TModel> : ObjectDbTest<TRepository>
|
||||
where TRepository : class, IBasicRepository<TModel>
|
||||
where TModel : ModelBase, new()
|
||||
{
|
||||
|
||||
protected BasicRepository<TModel> Storage { get; private set; }
|
||||
|
||||
[SetUp]
|
||||
public void RepositoryTestSetup()
|
||||
{
|
||||
WithObjectDb();
|
||||
Storage = Mocker.Resolve<BasicRepository<TModel>>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public abstract class ObjectDbTest<TSubject> : ObjectDbTest where TSubject : class
|
||||
{
|
||||
private TSubject _subject;
|
||||
|
@ -56,7 +73,7 @@ namespace NzbDrone.Core.Test.Framework
|
|||
//}
|
||||
//else
|
||||
//{
|
||||
_db = new SiaqoDbFactory(new DiskProvider(),new EnvironmentProvider()).Create(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Guid.NewGuid().ToString()));
|
||||
_db = new SiaqoDbFactory(new DiskProvider(), new EnvironmentProvider()).Create(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Guid.NewGuid().ToString()));
|
||||
//}
|
||||
|
||||
Mocker.SetConstant(Db);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue