mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
JobProvider can reset itself.
cleaned up unit test logging
This commit is contained in:
parent
82b6ec5ed4
commit
07458529f6
11 changed files with 401 additions and 398 deletions
|
@ -5,6 +5,7 @@ using NUnit.Framework;
|
|||
using Ninject;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Test.Common;
|
||||
using PetaPoco;
|
||||
|
||||
namespace NzbDrone.Core.Test.Framework
|
||||
{
|
||||
|
@ -30,6 +31,7 @@ namespace NzbDrone.Core.Test.Framework
|
|||
|
||||
protected StandardKernel LiveKernel = null;
|
||||
protected AutoMoqer Mocker = null;
|
||||
protected IDatabase Db = null;
|
||||
|
||||
protected string VirtualPath
|
||||
{
|
||||
|
@ -60,6 +62,16 @@ namespace NzbDrone.Core.Test.Framework
|
|||
protected void WithStrictMocker()
|
||||
{
|
||||
Mocker = new AutoMoqer(MockBehavior.Strict);
|
||||
if (Db != null)
|
||||
{
|
||||
Mocker.SetConstant(Db);
|
||||
}
|
||||
}
|
||||
|
||||
protected void WithRealDb()
|
||||
{
|
||||
Db = MockLib.GetEmptyDatabase();
|
||||
Mocker.SetConstant(Db);
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
|
@ -67,6 +79,7 @@ namespace NzbDrone.Core.Test.Framework
|
|||
{
|
||||
ExceptionVerification.AssertNoUnexcpectedLogs();
|
||||
Mocker = new AutoMoqer(MockBehavior.Strict);
|
||||
WebTimer.Stop();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue