mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-29 05:16:34 +02:00
less intrusive cache prevention.
more tests.
This commit is contained in:
@@ -93,9 +93,17 @@ namespace NzbDrone.Core.Test.Framework
|
||||
Mocker.SetConstant(Db);
|
||||
}
|
||||
|
||||
protected void WithObjectDb()
|
||||
protected void WithObjectDb(bool memory = true)
|
||||
{
|
||||
_objDb = new ObjectDbSessionFactory().Create(new PagingMemoryStorage());
|
||||
if (memory)
|
||||
{
|
||||
_objDb = new ObjectDbSessionFactory().Create(new PagingMemoryStorage());
|
||||
}
|
||||
else
|
||||
{
|
||||
_objDb = new ObjectDbSessionFactory().Create(dbName: Guid.NewGuid().ToString());
|
||||
}
|
||||
|
||||
Mocker.SetConstant(ObjDb);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user