You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.0 KiB
40 lines
1.0 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using Gallio.Framework;
|
|
using log4net;
|
|
using MbUnit.Framework;
|
|
using MbUnit.Framework.ContractVerifiers;
|
|
using Moq;
|
|
using NzbDrone.Core.Repository;
|
|
using NzbDrone.Core.Controllers;
|
|
using SubSonic.Repository;
|
|
|
|
namespace NzbDrone.Core.Test
|
|
{
|
|
[TestFixture]
|
|
public class SabControllerTest
|
|
{
|
|
[Test]
|
|
public void AddByUrl()
|
|
{
|
|
//Setup
|
|
String key = "SabnzbdInfo";
|
|
String value = "192.168.5.55:2222";
|
|
|
|
var repo = new Mock<IRepository>();
|
|
var config = new Mock<IConfigController>();
|
|
config.Setup(c => c.SetValue("SabnzbdInfo", "192.168.5.55:2222"));
|
|
|
|
//var config = new Config() { Key = key, Value = value };
|
|
var target = new SabController(config.Object, new Mock<ILog>().Object);
|
|
|
|
//Act
|
|
bool result = target.AddByUrl("http://www.nzbclub.com/nzb_download.aspx?mid=1950232");
|
|
|
|
//Assert
|
|
Assert.AreEqual(true, result);
|
|
}
|
|
}
|
|
}
|