我正在使用 MockMvcResultMatchers 来测试我的控制器类。
这是一个示例代码
RequestBuilder request = get("/employee/")
.contentType(MediaType.APPLICATION_JSON)
.accept(APPLICATION_JSON_UTF8);
mockMvc
.perform(request)
.andExpect(status().isOk())
.andExpect(jsonPath("$.total").exists());
但是我如何将 $.total 值与数字进行比较?
我的意思是,有没有办法找出 $.total > 0?