hasItems() works only for JSON. For XML we have to use
hasXPath()
// test multiple values String result= given().header("accept", "application/xml") .expect() .body(hasXPath("//symbol[text()='SYM9']"),hasXPath("//symbol[text()='SYM1']")) .when() .get("/RestFullDayTrader/resources/quotes").asString();
No comments:
Post a Comment