我试试
@Test
public void testGetSingleUser() {
given().expect().
statusCode(200).contentType(ContentType.JSON).
body("_testingString", equalTo("got it")).when().
get("http://localhost:8080/getIt");
}
Run Code Online (Sandbox Code Playgroud)
但总是得到这个错误信息
java.lang.AssertionError:JSON路径_testingString不匹配.
预期:"得到它"得到:[得到它]
如何忽略""和[]问题谢谢