post请求的测试就是调用MockMvcRequestBuilders的post方法, 在该方法中传入接口地址。
MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.post("/v1/blockly/copy")
.param(“id”, “1211”);
success(requestBuilder);
post请求的测试就是调用MockMvcRequestBuilders的post方法, 在该方法中传入接口地址。
MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.post("/v1/blockly/copy")
.param(“id”, “1211”);
success(requestBuilder);