Skip to content

Commit

Permalink
Add additional testing assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
magaupp committed Dec 10, 2024
1 parent 234849c commit fe91f75
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fe91f75

Please sign in to comment.