public ClientServiceTest() { var clientData = ClientListStub.GetStringData(); var clientHandlerStub = new DelegatingHandlerStub(clientData); var client = new HttpClient(clientHandlerStub); _httpClient.Setup(_ => _.CreateClient(It.IsAny <string>())).Returns(client); _service = new ClientService(_httpClient.Object); }
public PolicyServiceTest() { var policyData = PolicyListStub.GetStringData(); var clientHandlerStub = new DelegatingHandlerStub(policyData); var client = new HttpClient(clientHandlerStub); _httpClient.Setup(_ => _.CreateClient(It.IsAny <string>())).Returns(client); var clients = new List <Client>(); _service = new PolicyService(_httpClient.Object, _client.Object); }