我正在使用黄瓜来定义我的测试脚本,下面是我的测试步骤之一 **并回复获取国家和城市名称 | Response.Data [“ countries_and_cities_names”] [0] .language_code | IT | **
@And("response Get Countries and Cities names")
public void response_Get_Countries_and_Cities_names(Map < String, String > responseFields)
{
for (Map.Entry < String, String > field : responseFields.entrySet()) {
if (StringUtils.isNumeric(field.getValue())) {
json.body(field.getKey(),
containsInAnyOrder(Integer.parseInt(field.getValue())));
}
else {
json.body(field.getKey(), containsInAnyOrder(String.valueOf(field.getValue())));
}
}
}
JSON路径Response.Data [“ countries_and_cities_names”] [0] .language_code不匹配。预期:包含[“ IT”]的可迭代 实际:IT
有人可以帮我匹配两个字符串吗?