mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-25 02:30:20 +02:00
Some minor clean-up.
This commit is contained in:
parent
50a8af0842
commit
910efb5941
@ -1,4 +1,5 @@
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
using NUnit.Framework;
|
||||
using Ninject;
|
||||
using NzbDrone.Common;
|
||||
@ -35,24 +36,17 @@ static CoreTest()
|
||||
TestDbHelper.CreateDataBaseTemplate();
|
||||
}
|
||||
|
||||
protected StandardKernel LiveKernel = null;
|
||||
protected IDatabase Db = null;
|
||||
|
||||
|
||||
[SetUp]
|
||||
public virtual void CoreTestSetup()
|
||||
private IDatabase _db;
|
||||
protected IDatabase Db
|
||||
{
|
||||
LiveKernel = new StandardKernel();
|
||||
}
|
||||
|
||||
protected override void WithStrictMocker()
|
||||
{
|
||||
base.WithStrictMocker();
|
||||
|
||||
if (Db != null)
|
||||
get
|
||||
{
|
||||
Mocker.SetConstant(Db);
|
||||
if (_db == null)
|
||||
throw new InvalidOperationException("Test db doesn't exists. Make sure you call WithRealDb() if you intend to use an actual database.");
|
||||
|
||||
return _db;
|
||||
}
|
||||
private set { _db = value; }
|
||||
}
|
||||
|
||||
protected void WithRealDb()
|
||||
|
@ -22,7 +22,7 @@ public class TvDbProviderTest : CoreTest
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
tvDbProvider = LiveKernel.Get<TvDbProvider>();
|
||||
tvDbProvider = new StandardKernel().Get<TvDbProvider>();
|
||||
}
|
||||
|
||||
[TestCase("The Simpsons")]
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Runtime.CompilerServices;
|
||||
@ -14,6 +15,7 @@
|
||||
|
||||
namespace NzbDrone.Test.Common.AutoMoq
|
||||
{
|
||||
[DebuggerStepThrough]
|
||||
public class AutoMoqer
|
||||
{
|
||||
internal readonly MockBehavior DefaultBehavior = MockBehavior.Default;
|
||||
|
@ -144,7 +144,7 @@ hr
|
||||
|
||||
|
||||
/* Footer */
|
||||
.footer
|
||||
#footer
|
||||
{
|
||||
padding: 1px 1px 1px 1px;
|
||||
color: #065EFE;
|
||||
|
@ -9,12 +9,10 @@ namespace NzbDrone.Web.Controllers
|
||||
{
|
||||
public class SharedController : Controller
|
||||
{
|
||||
private readonly JobProvider _jobProvider;
|
||||
private readonly EnviromentProvider _enviromentProvider;
|
||||
|
||||
public SharedController(JobProvider jobProvider, EnviromentProvider enviromentProvider)
|
||||
{
|
||||
_jobProvider = jobProvider;
|
||||
_enviromentProvider = enviromentProvider;
|
||||
}
|
||||
|
||||
|
@ -7,13 +7,15 @@
|
||||
#if DEBUG
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using EnvDTE;
|
||||
using EnvDTE80;
|
||||
using Process = EnvDTE.Process;
|
||||
using Thread = System.Threading.Thread;
|
||||
|
||||
namespace NzbDrone
|
||||
{
|
||||
[DebuggerStepThrough]
|
||||
public class ProcessAttacher
|
||||
{
|
||||
public static void Attach()
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
namespace NzbDrone.Providers
|
||||
{
|
||||
[DebuggerStepThroughAttribute]
|
||||
public class DebuggerProvider
|
||||
{
|
||||
private static readonly Logger Logger = LogManager.GetLogger("Host.DebuggerProvider");
|
||||
|
Loading…
Reference in New Issue
Block a user