Search in sources :

Example 1 with GraphResponse

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);
}
Also used : ReportResponse(wooteco.prolog.report.application.dto.report.response.ReportResponse) StudylogAbilityResponse(wooteco.prolog.report.application.dto.report.response.studylogs.StudylogAbilityResponse) GraphResponse(wooteco.prolog.report.application.dto.report.response.ability_graph.GraphResponse) ReportRequest(wooteco.prolog.report.application.dto.report.request.ReportRequest) GraphAbilityResponse(wooteco.prolog.report.application.dto.report.response.ability_graph.GraphAbilityResponse) StudylogResponse(wooteco.prolog.report.application.dto.report.response.studylogs.StudylogResponse) Then(io.cucumber.java.en.Then)

Aggregations

Then (io.cucumber.java.en.Then)1 ReportRequest (wooteco.prolog.report.application.dto.report.request.ReportRequest)1 ReportResponse (wooteco.prolog.report.application.dto.report.response.ReportResponse)1 GraphAbilityResponse (wooteco.prolog.report.application.dto.report.response.ability_graph.GraphAbilityResponse)1 GraphResponse (wooteco.prolog.report.application.dto.report.response.ability_graph.GraphResponse)1 StudylogAbilityResponse (wooteco.prolog.report.application.dto.report.response.studylogs.StudylogAbilityResponse)1 StudylogResponse (wooteco.prolog.report.application.dto.report.response.studylogs.StudylogResponse)1