Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }