public void ResponseHeaderValueVerificationTest() { string expectedHeaderValue = "application/json; charset=utf-8"; HttpWebResponse response = GetDataFromWebService.MakeRequest(method, url); Assert.AreEqual(expectedHeaderValue, GetDataFromWebService.GetResponseHeader(response)); }
public void ResponseStatusCodeVerificationTest() { int expectedStatusCode = 200; HttpWebResponse response = GetDataFromWebService.MakeRequest(method, url); Assert.AreEqual(expectedStatusCode, GetDataFromWebService.GetResponseStatusCode(response)); }
public void ResponseBodyContentVerificationTest() { int expectedNumberOfUsers = 10; HttpWebResponse response = GetDataFromWebService.MakeRequest(method, url); string responseBody = GetDataFromWebService.GetResponseBody(response); Assert.AreEqual(expectedNumberOfUsers, GetDataFromWebService.GetCountOFUsersFromResponse(responseBody)); }
public void ResponseHeaderExistsVerificationTest() { HttpWebResponse response = GetDataFromWebService.MakeRequest(method, url); Assert.IsTrue(GetDataFromWebService.GetResponseHeader(response) != null); }