1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-23 00:12:44 +00:00
Radarr/NzbDrone.Core.Test/SabControllerTest.cs
markus101 a427f9c16d SabController - Removed AddByPath, Completed AddByUrl and IsInQueue
Created SabControllerTest - Added AddByPath Test (Needs more work)
Added, Episode, FeedItem, ItemInfo and Site classes to store information
2010-09-26 19:20:42 -07:00

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);
}
}
}