|
|
@ -6,6 +6,9 @@ using NzbDrone.Common.Http;
|
|
|
|
using NzbDrone.Common.Http.Dispatchers;
|
|
|
|
using NzbDrone.Common.Http.Dispatchers;
|
|
|
|
using NzbDrone.Common.TPL;
|
|
|
|
using NzbDrone.Common.TPL;
|
|
|
|
using NzbDrone.Test.Common;
|
|
|
|
using NzbDrone.Test.Common;
|
|
|
|
|
|
|
|
using NzbDrone.Common.Http.Proxy;
|
|
|
|
|
|
|
|
using NzbDrone.Core.Http;
|
|
|
|
|
|
|
|
using NzbDrone.Core.Configuration;
|
|
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Test.Framework
|
|
|
|
namespace NzbDrone.Core.Test.Framework
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -13,6 +16,10 @@ namespace NzbDrone.Core.Test.Framework
|
|
|
|
{
|
|
|
|
{
|
|
|
|
protected void UseRealHttp()
|
|
|
|
protected void UseRealHttp()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
Mocker.SetConstant<IHttpProxySettingsProvider>(new HttpProxySettingsProvider(Mocker.Resolve<ConfigService>()));
|
|
|
|
|
|
|
|
Mocker.SetConstant<ICreateManagedWebProxy>(new ManagedWebProxyFactory(Mocker.Resolve<CacheManager>()));
|
|
|
|
|
|
|
|
Mocker.SetConstant<ManagedHttpDispatcher>(new ManagedHttpDispatcher(Mocker.Resolve<IHttpProxySettingsProvider>(), Mocker.Resolve<ICreateManagedWebProxy>()));
|
|
|
|
|
|
|
|
Mocker.SetConstant<CurlHttpDispatcher>(new CurlHttpDispatcher(Mocker.Resolve<IHttpProxySettingsProvider>(), Mocker.Resolve<NLog.Logger>()));
|
|
|
|
Mocker.SetConstant<IHttpProvider>(new HttpProvider(TestLogger));
|
|
|
|
Mocker.SetConstant<IHttpProvider>(new HttpProvider(TestLogger));
|
|
|
|
Mocker.SetConstant<IHttpClient>(new HttpClient(new IHttpRequestInterceptor[0], Mocker.Resolve<CacheManager>(), Mocker.Resolve<RateLimitService>(), Mocker.Resolve<FallbackHttpDispatcher>(), TestLogger));
|
|
|
|
Mocker.SetConstant<IHttpClient>(new HttpClient(new IHttpRequestInterceptor[0], Mocker.Resolve<CacheManager>(), Mocker.Resolve<RateLimitService>(), Mocker.Resolve<FallbackHttpDispatcher>(), TestLogger));
|
|
|
|
Mocker.SetConstant<ISonarrCloudRequestBuilder>(new SonarrCloudRequestBuilder());
|
|
|
|
Mocker.SetConstant<ISonarrCloudRequestBuilder>(new SonarrCloudRequestBuilder());
|
|
|
|