mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
added support for 0 based sequential ids to our object db.
This commit is contained in:
parent
a0c7ccfe7c
commit
c6fa3cc02b
17 changed files with 375 additions and 29 deletions
|
@ -6,8 +6,35 @@ using NzbDrone.Core.Datastore;
|
|||
|
||||
namespace NzbDrone.Core.Test.Framework
|
||||
{
|
||||
|
||||
public abstract class ObjectDbTest<TSubject> : ObjectDbTest where TSubject : class
|
||||
{
|
||||
private TSubject _subject;
|
||||
|
||||
[SetUp]
|
||||
public void CoreTestSetup()
|
||||
{
|
||||
_subject = null;
|
||||
}
|
||||
|
||||
protected TSubject Subject
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_subject == null)
|
||||
{
|
||||
_subject = Mocker.Resolve<TSubject>();
|
||||
}
|
||||
|
||||
return _subject;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class ObjectDbTest : CoreTest
|
||||
{
|
||||
|
||||
private EloqueraDb _db;
|
||||
protected EloqueraDb Db
|
||||
{
|
||||
|
@ -32,6 +59,7 @@ namespace NzbDrone.Core.Test.Framework
|
|||
}
|
||||
|
||||
Mocker.SetConstant(Db);
|
||||
Mocker.SetConstant(Db.Db);
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue