use of fi.otavanopisto.muikku.atests.StudentFlag in project muikku by otavanopisto.
the class AbstractUITest method flagStudent.
protected Long flagStudent(Long studentId, Long flagId) throws JsonParseException, JsonMappingException, IOException {
ObjectMapper objectMapper = new ObjectMapper().registerModule(new JSR310Module()).disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
Response response = asAdmin().contentType("application/json").post("/test/students/{ID}/flags/{FLAGID}", studentId, flagId);
response.then().statusCode(200);
StudentFlag result = objectMapper.readValue(response.asString(), StudentFlag.class);
return result.getId();
}
Aggregations