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; }
public void ThenValidateAlbumCountInApiResponse() { int intValue = RestAPIHelper.ReturnCount(requestFormat, apiResponse); Assert.IsTrue(intValue > 1, "Count not more than 1"); }