public async Task PathOnly_HappyPath() { var serviceMock = new ServiceMock("http://*****:*****@"{ ""someProp"": ""propVal1"", ""someArray"":[""a1"",""a2"",""a3""]}" , Encoding.UTF8, "application/json"); var response = await httpClient.PutAsync("test/id", bodyContent); Assert.AreEqual(HttpStatusCode.OK, response.StatusCode, "The status code is not as expected!"); // Assert.AreEqual("text\\text", response.Headers.) string responseContent = await response.Content.ReadAsStringAsync(); Assert.AreEqual(@"{""status"":0, ""message"":""Test succeeded""}", responseContent, "The response content is not as expected!"); } } finally { await serviceMock.Stop(); } }