Tag: 放心

RestAssured-身体中的对象抛出错误

我通过测试的对象 @Data public class UserRequest { @JsonProperty(“name”) private final String name; @JsonProperty(“surname”) private final String surname; @JsonProperty(“email”) private final String email; @JsonProperty(“iaAdmin”) private final boolean isAdmin; } 比我有它测试 @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class UserControllerIT { @LocalServerPort private int port; @Test public void testIsCreatingNewUser() throws IOException{ given() .when() .body(new UserRequest(“asd”,”sad”,”asd”,false))//.body(TestGenerator.getUserRequest()) .port(port) .post(“/user/” + TestGenerator.randomUUID) .then() […]