mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-23 08:15:27 +00:00
a427f9c16d
Created SabControllerTest - Added AddByPath Test (Needs more work) Added, Episode, FeedItem, ItemInfo and Site classes to store information
39 lines
1 KiB
C#
39 lines
1 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|