internal EhlHttpClient( HttpMessageHandler messageHandler, IPersistAttachments attachmentPersister) { _attachmentPersister = attachmentPersister; _httpClient = new HttpClient(messageHandler) { Timeout = TimeSpan.FromSeconds(45) }; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; }
public EnergyProviderAdapter( string providerName, string brandCodePrefix, Func <HttpMessageHandler, HttpMessageHandler> messageHandlerDecorator, IPersistAttachments attachmentPersister) { _providerName = providerName; _brandCodePrefix = brandCodePrefix; _ehlCommsAggregator = new EhlCommsAggregator( new EhlApiCalls( new EhlHttpClient(messageHandlerDecorator, attachmentPersister))); }
public void Setup() { AttachmentPersister = Mock.Of <IPersistAttachments>(); }
public EhlHttpClient( Func <HttpMessageHandler, HttpMessageHandler> messageHandlerDecorator, IPersistAttachments attachmentPersister) : this(messageHandlerDecorator(new HttpClientHandler()), attachmentPersister) { }