less intrusive cache prevention.

more tests.
This commit is contained in:
kay.one 2013-02-02 12:22:46 -08:00
commit 9f829c1442
9 changed files with 131 additions and 177 deletions

View file

@ -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);
}