Skip to content

Commit

Permalink
Fixing Assessment Unit Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Wiens committed Jun 13, 2024
1 parent 859706e commit 7c36b12
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public void testLaneDirectionOfTravelAssessment() {


Query query = laneDirectionOfTravelAssessmentRepo.getQuery(assessment.getIntersectionID(), assessment.getAssessmentGeneratedAt()-1, assessment.getAssessmentGeneratedAt() + 1, false);

when(laneDirectionOfTravelAssessmentRepo.find(query)).thenReturn(assessments);

ResponseEntity<List<LaneDirectionOfTravelAssessment>> result = controller.findLaneDirectionOfTravelAssessment(assessment.getRoadRegulatorID(), assessment.getIntersectionID(), assessment.getAssessmentGeneratedAt() - 1, assessment.getAssessmentGeneratedAt() + 1, false, false);
Expand All @@ -81,7 +82,7 @@ public void testConnectionOfTravelAssessment() {
Query query = connectionOfTravelAssessmentRepo.getQuery(assessment.getIntersectionID(), assessment.getAssessmentGeneratedAt()-1, assessment.getAssessmentGeneratedAt() + 1, false);
when(connectionOfTravelAssessmentRepo.find(query)).thenReturn(assessments);

ResponseEntity<List<ConnectionOfTravelAssessment>> result = controller.findConnectionOfTravelAssessment(assessment.getRoadRegulatorID(), assessment.getIntersectionID(), assessment.getAssessmentGeneratedAt() - 1, assessment.getAssessmentGeneratedAt() + 1, false, true, false);
ResponseEntity<List<ConnectionOfTravelAssessment>> result = controller.findConnectionOfTravelAssessment(assessment.getRoadRegulatorID(), assessment.getIntersectionID(), assessment.getAssessmentGeneratedAt() - 1, assessment.getAssessmentGeneratedAt() + 1, false, false);
assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
// assertThat(result.getHeaders().getContentType()).isEqualTo(MediaType.APPLICATION_JSON);
assertThat(result.getBody()).isEqualTo(assessments);
Expand Down

0 comments on commit 7c36b12

Please sign in to comment.