use of wooteco.prolog.report.application.dto.report.response.ability_graph.GraphResponse in project prolog by woowacourse.
the class ReportStepDefinitions method 리포트가수정된다.
@Then("리포트가 수정된다")
public void 리포트가수정된다() {
int status = context.response.statusCode();
assertThat(status).isEqualTo(200);
ReportResponse reportResponse = context.response.as(ReportResponse.class);
ReportRequest reportRequest = (ReportRequest) context.storage.get("reportRequest");
ReportResponse expected = new ReportResponse(reportRequest.getId(), reportRequest.getTitle(), reportRequest.getDescription(), LocalDateTime.now(), LocalDateTime.now(), new GraphResponse(Arrays.asList(new GraphAbilityResponse(3L, "디자인", "blue", 2L, 1.0, true), new GraphAbilityResponse(1L, "프로그래밍", "red", 2L, 0.0, false))), Arrays.asList(new StudylogResponse(reportRequest.getStudylogs().get(0).getId(), LocalDateTime.now(), LocalDateTime.now(), "[자바][옵셔널] 학습log 제출합니다.", Arrays.asList(new StudylogAbilityResponse(3L, "디자인", "blue", true)))), true);
assertThat(reportResponse).usingRecursiveComparison().ignoringFields("studylogs.createAt", "studylogs.updateAt", "createdAt", "updatedAt").isEqualTo(expected);
}
Aggregations