You've already forked Sonarr
mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-11-06 09:19:38 +02:00
Added AutoMoq. Removed IHTTP Provider
This commit is contained in:
@@ -5,11 +5,11 @@ using NLog;
|
||||
|
||||
namespace NzbDrone.Core.Providers.Core
|
||||
{
|
||||
internal class HttpProvider : IHttpProvider
|
||||
public class HttpProvider
|
||||
{
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public string DownloadString(string request)
|
||||
public virtual string DownloadString(string request)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -24,7 +24,7 @@ namespace NzbDrone.Core.Providers.Core
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
public string DownloadString(string request, string username, string password)
|
||||
public virtual string DownloadString(string request, string username, string password)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -41,7 +41,7 @@ namespace NzbDrone.Core.Providers.Core
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
public void DownloadFile(string request, string filename)
|
||||
public virtual void DownloadFile(string request, string filename)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -59,7 +59,7 @@ namespace NzbDrone.Core.Providers.Core
|
||||
|
||||
}
|
||||
|
||||
public void DownloadFile(string request, string filename, string username, string password)
|
||||
public virtual void DownloadFile(string request, string filename, string username, string password)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -75,7 +75,7 @@ namespace NzbDrone.Core.Providers.Core
|
||||
}
|
||||
}
|
||||
|
||||
public XmlReader DownloadXml(string url)
|
||||
public virtual XmlReader DownloadXml(string url)
|
||||
{
|
||||
return XmlReader.Create(url);
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
using System.Xml;
|
||||
|
||||
namespace NzbDrone.Core.Providers.Core
|
||||
{
|
||||
public interface IHttpProvider
|
||||
{
|
||||
string DownloadString(string request);
|
||||
string DownloadString(string request, string username, string password);
|
||||
void DownloadFile(string request, string filename);
|
||||
void DownloadFile(string request, string filename, string username, string password);
|
||||
XmlReader DownloadXml(string url);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user