如果测试girlAdd方法的话,需要传入参数,该怎么传入来进行单元测试呢?
@Test public void addGirl() throws Exception{ mvc.perform(MockMvcRequestBuilders.post("/girls"). param("age","18").param("cupSize","B").param("money","100")) .andExpect(MockMvcResultMatchers.status().isOk()) .andExpect(MockMvcResultMatchers.jsonPath("$.data.age").value(18)); }