コード例 #1
0
        public void HttpRequester_SuccessStatusCode_ReturnsSuccess()
        {
            _fakeResponseHandler.AddFakeResponse(
                new Uri(_apiUrl),
                new HttpResponseMessage(HttpStatusCode.OK));

            var             httpClient = new HttpClient(_fakeResponseHandler);
            Task <Response> response   = _httpRequester.DoRequest(
                httpClient,
                HttpMethod.Get,
                new Uri(_apiUrl),
                _headers,
                byteContent: null);

            Assert.IsTrue(response.Result.Success);
        }