diff --git a/src/test/java/de/tum/cit/aet/artemis/programming/hestia/ProgrammingExerciseGitDiffReportIntegrationTest.java b/src/test/java/de/tum/cit/aet/artemis/programming/hestia/ProgrammingExerciseGitDiffReportIntegrationTest.java index f9c7f244d61d..453cb7ef80b7 100644 --- a/src/test/java/de/tum/cit/aet/artemis/programming/hestia/ProgrammingExerciseGitDiffReportIntegrationTest.java +++ b/src/test/java/de/tum/cit/aet/artemis/programming/hestia/ProgrammingExerciseGitDiffReportIntegrationTest.java @@ -133,7 +133,13 @@ void getGitDiffReportForCommits() throws Exception { + "?participationId=" + submission.getParticipation().getId(), HttpStatus.OK, ProgrammingExerciseGitDiffReport.class); assertThat(report).isNotNull(); assertThat(report.getEntries()).hasSize(1); - // TODO: add more assertions + var entry = report.getEntries().stream().findAny().orElseThrow(); + assertThat(entry.getPreviousFilePath()).isEqualTo(FILE_NAME); + assertThat(entry.getPreviousStartLine()).isEqualTo(1); + assertThat(entry.getPreviousLineCount()).isEqualTo(1); + assertThat(entry.getFilePath()).isEqualTo(FILE_NAME); + assertThat(entry.getStartLine()).isEqualTo(1); + assertThat(entry.getLineCount()).isEqualTo(1); } @Test @@ -194,7 +200,13 @@ void getGitDiffBetweenTwoSubmissions() throws Exception { ProgrammingExerciseGitDiffReport.class); assertThat(report).isNotNull(); assertThat(report.getEntries()).hasSize(1); - // TODO: add more assertions + var entry = report.getEntries().stream().findAny().orElseThrow(); + assertThat(entry.getPreviousFilePath()).isEqualTo(FILE_NAME); + assertThat(entry.getPreviousStartLine()).isEqualTo(1); + assertThat(entry.getPreviousLineCount()).isEqualTo(1); + assertThat(entry.getFilePath()).isEqualTo(FILE_NAME); + assertThat(entry.getStartLine()).isEqualTo(1); + assertThat(entry.getLineCount()).isEqualTo(1); } @Test