Added RateLimit service to globally manager short duration ratelimits.

This commit is contained in:
Taloth Saldono 2015-05-27 22:25:53 +02:00
parent fac6b05bb4
commit 78ade3250c
14 changed files with 218 additions and 250 deletions

View file

@ -3,6 +3,7 @@ using NUnit.Framework;
using NzbDrone.Common.Cache;
using NzbDrone.Common.Cloud;
using NzbDrone.Common.Http;
using NzbDrone.Common.TPL;
using NzbDrone.Test.Common;
namespace NzbDrone.Core.Test.Framework
@ -17,7 +18,7 @@ namespace NzbDrone.Core.Test.Framework
protected void UseRealHttp()
{
Mocker.SetConstant<IHttpProvider>(new HttpProvider(TestLogger));
Mocker.SetConstant<IHttpClient>(new HttpClient(Mocker.Resolve<CacheManager>(), TestLogger));
Mocker.SetConstant<IHttpClient>(new HttpClient(Mocker.Resolve<CacheManager>(), Mocker.Resolve<RateLimitService>(), TestLogger));
Mocker.SetConstant<IDroneServicesRequestBuilder>(new DroneServicesHttpRequestBuilder());
}
}