IHttpController/HttpController Added (So we can Mock SABnzbd requests)

More unit tests for SabController
This commit is contained in:
markus101 2010-09-27 17:49:34 -07:00
parent 50f97e824e
commit a2967f4658
9 changed files with 407 additions and 23 deletions

View file

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
namespace NzbDrone.Core.Controllers
{
class HttpController : IHttpController
{
public string GetRequest(string request)
{
//Get the request and return as String Array
try
{
var webClient = new WebClient();
return webClient.DownloadString(request);
}
catch (Exception ex)
{
Console.WriteLine(ex);
return String.Empty;
}
}
}
}