mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-16 15:29:40 +02:00
Merge branch 'master' of git://github.com/kayone/NzbDrone
This commit is contained in:
commit
67b617b950
@ -13,17 +13,18 @@
|
|||||||
namespace NzbDrone.Core.Test
|
namespace NzbDrone.Core.Test
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
|
// ReSharper disable InconsistentNaming
|
||||||
public class DbConfigControllerTest
|
public class DbConfigControllerTest
|
||||||
{
|
{
|
||||||
[Test]
|
[Test]
|
||||||
public void Overwrite_existing_value()
|
public void Overwrite_existing_value()
|
||||||
{
|
{
|
||||||
String key = "MY_KEY";
|
const string key = "MY_KEY";
|
||||||
String value = "MY_VALUE";
|
const string value = "MY_VALUE";
|
||||||
|
|
||||||
//setup
|
//Arrange
|
||||||
var repo = new Mock<IRepository>();
|
var repo = new Mock<IRepository>();
|
||||||
var config = new Config() { Key = key, Value = value };
|
var config = new Config { Key = key, Value = value };
|
||||||
repo.Setup(r => r.Single<Config>(key)).Returns(config);
|
repo.Setup(r => r.Single<Config>(key)).Returns(config);
|
||||||
var target = new DbConfigController(new Mock<ILog>().Object, repo.Object);
|
var target = new DbConfigController(new Mock<ILog>().Object, repo.Object);
|
||||||
|
|
||||||
@ -38,12 +39,11 @@ public void Overwrite_existing_value()
|
|||||||
[Test]
|
[Test]
|
||||||
public void Add_new_value()
|
public void Add_new_value()
|
||||||
{
|
{
|
||||||
String key = "MY_KEY";
|
const string key = "MY_KEY";
|
||||||
String value = "MY_VALUE";
|
const string value = "MY_VALUE";
|
||||||
|
|
||||||
//setup
|
//Arrange
|
||||||
var repo = new Mock<IRepository>();
|
var repo = new Mock<IRepository>();
|
||||||
var config = new Config() { Key = key, Value = value };
|
|
||||||
repo.Setup(r => r.Single<Config>(It.IsAny<string>())).Returns<Config>(null).Verifiable();
|
repo.Setup(r => r.Single<Config>(It.IsAny<string>())).Returns<Config>(null).Verifiable();
|
||||||
var target = new DbConfigController(new Mock<ILog>().Object, repo.Object);
|
var target = new DbConfigController(new Mock<ILog>().Object, repo.Object);
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using log4net;
|
|
||||||
using Ninject;
|
using Ninject;
|
||||||
using Ninject.Web.Mvc;
|
using Ninject.Web.Mvc;
|
||||||
using NzbDrone.Core;
|
using NzbDrone.Core;
|
||||||
|
@ -34,10 +34,6 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\SABSync\References\log4net.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Ninject, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
|
<Reference Include="Ninject, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\NzbDrone.Core\Libraries\Ninject.dll</HintPath>
|
<HintPath>..\NzbDrone.Core\Libraries\Ninject.dll</HintPath>
|
||||||
|
Loading…
Reference in New Issue
Block a user