Ejemplo n.º 1
0
        public void ResponseHeaderValueVerificationTest()
        {
            string          expectedHeaderValue = "application/json; charset=utf-8";
            HttpWebResponse response            = GetDataFromWebService.MakeRequest(method, url);

            Assert.AreEqual(expectedHeaderValue, GetDataFromWebService.GetResponseHeader(response));
        }
Ejemplo n.º 2
0
        public void ResponseStatusCodeVerificationTest()
        {
            int             expectedStatusCode = 200;
            HttpWebResponse response           = GetDataFromWebService.MakeRequest(method, url);

            Assert.AreEqual(expectedStatusCode, GetDataFromWebService.GetResponseStatusCode(response));
        }
Ejemplo n.º 3
0
        public void ResponseBodyContentVerificationTest()
        {
            int             expectedNumberOfUsers = 10;
            HttpWebResponse response     = GetDataFromWebService.MakeRequest(method, url);
            string          responseBody = GetDataFromWebService.GetResponseBody(response);

            Assert.AreEqual(expectedNumberOfUsers, GetDataFromWebService.GetCountOFUsersFromResponse(responseBody));
        }
Ejemplo n.º 4
0
        public void ResponseHeaderExistsVerificationTest()
        {
            HttpWebResponse response = GetDataFromWebService.MakeRequest(method, url);

            Assert.IsTrue(GetDataFromWebService.GetResponseHeader(response) != null);
        }