Exemplo n.º 1
0
        public void ThenValidateCountInApiResponse()
        {
            int intValue = RestAPIHelper.ReturnCount(requestFormat, apiResponse);

            Assert.IsTrue(intValue > 1, "Count not more than 1");

            if (requestFormat.Equals("json"))
            {
                idValue = JObject.Parse(apiResponse.Content)["result"][0]["id"].Value <string>();
            }
            else if (requestFormat.Equals("xml"))
            {
                idValue = RestAPIHelper.ReturnXmlId(apiResponse);
            }
            context["flag"] = true;
        }
Exemplo n.º 2
0
        public void ThenValidateAlbumCountInApiResponse()
        {
            int intValue = RestAPIHelper.ReturnCount(requestFormat, apiResponse);

            Assert.IsTrue(intValue > 1, "Count not more than 1");
        }