MockMvc期望实体{field,field}但获得{field,field}

时间:2018-02-14 23:59:00

标签: java spring spring-mvc testing mockmvc

我正在测试一个客户端,特别是我得到了所有客户端,我有这段代码:

ClientMockMvc.perform(get("/clients?sort=id,desc"))
        .andExpect(status().isOk())
        .andExpect(jsonPath("$.[*].location").value(DEFAULT_LOCATION))

但我收到了这个错误:

预期:位置{id = 974351,street ='AAAAA',number ='AAAA',省= {id = 974251,desc =“AAAA”}}

实际:{id = 974351,street ='AAAAA',number ='AAAA',省= {id = 974251,desc =“AAAA”}}

我无法找到解决方法,任何人都有想法?难道我做错了什么? 提前谢谢!

0 个答案:

没有答案