use of de.tum.in.www1.artemis.domain.analytics.TextAssessmentEvent in project Artemis by ls1intum.
the class TutorEffortIntegrationTest method testCalculateTutorEffortsDistance5Minutes.
/**
* Tests the TutorEffortResource.calculateTutorEffort method with a scenario involving a distance
* between timestamps of 5 minutes.
* @throws Exception
*/
@Test
@WithMockUser(username = "instructor", roles = "INSTRUCTOR")
public void testCalculateTutorEffortsDistance5Minutes() throws Exception {
List<TextAssessmentEvent> events = createTextAssessmentEventsInIntervals(6, 5);
textAssessmentEventRepository.saveAll(events);
List<TutorEffort> tutorEfforts = request.getList("/api/courses/" + course.getId() + "/exercises/" + exercise.getId() + "/tutor-effort", HttpStatus.OK, TutorEffort.class);
TutorEffort effortExpected = createTutorEffortObject(25);
assertThat(tutorEfforts).isNotNull().hasSize(1);
assertThat(tutorEfforts.get(0)).usingRecursiveComparison().isEqualTo(effortExpected);
}
Aggregations