public async Task TestThatGetEmployeeWithOnePositionWorks() { //send request to the server to /employee/position/#position string position = "Regular"; HttpResponseMessage response = await _client.GetAsync(urlemploeesPos + position); //Verify that the we have OK status code Assert.AreEqual(response.StatusCode, HttpStatusCode.OK, "Sorry, the response status is NotOK"); //Compare the the response from the HttpClient and the XML to have all the right data dynamic JSONresp = JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); bool comp = Comparisons.ContainsAtLeastOne(JSONresp, xdoc, position); Assert.IsTrue(comp, "XML objects and respnse object are not equal"); }