From 448249c2dd4cf19106a63bdacc5f91f3f6465f80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20G=C3=B6=C3=9Fmann?= Date: Mon, 5 Aug 2024 13:10:23 +0200 Subject: [PATCH] Fixes impractical comment line breaks --- .../in/www1/artemis/science/ScienceUtilService.java | 3 +-- .../service/DataExportCreationServiceTest.java | 13 ++++--------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/test/java/de/tum/in/www1/artemis/science/ScienceUtilService.java b/src/test/java/de/tum/in/www1/artemis/science/ScienceUtilService.java index 026b5b00cb67..d7cbc1010b9e 100644 --- a/src/test/java/de/tum/in/www1/artemis/science/ScienceUtilService.java +++ b/src/test/java/de/tum/in/www1/artemis/science/ScienceUtilService.java @@ -36,8 +36,7 @@ public ScienceEvent createScienceEvent(String identity, ScienceEventType type, L /** * Comparator for comparing two science events. - * Allows for a 500ns difference between the timestamps due to the reimport from - * the csv export. + * Allows for a 500ns difference between the timestamps due to the reimport from the csv export. */ public static Comparator scienceEventComparator = Comparator.comparing(ScienceEvent::getResourceId).thenComparing(ScienceEvent::getType) .thenComparing((ScienceEvent e1, ScienceEvent e2) -> { diff --git a/src/test/java/de/tum/in/www1/artemis/service/DataExportCreationServiceTest.java b/src/test/java/de/tum/in/www1/artemis/service/DataExportCreationServiceTest.java index 928a00214022..98f8b97e07e3 100644 --- a/src/test/java/de/tum/in/www1/artemis/service/DataExportCreationServiceTest.java +++ b/src/test/java/de/tum/in/www1/artemis/service/DataExportCreationServiceTest.java @@ -230,14 +230,10 @@ private void assertCommunicationDataCsvFile(Path courseDirPath) { /** * Asserts the content of the science events CSV file. - * Allows for a 500ns difference between the timestamps due to the reimport from - * the csv export. - * Might cause the test to be flaky if multiple events are created overlapping - * and matched wrongly. + * Allows for a 500ns difference between the timestamps due to the reimport from the csv export. * * @param extractedZipDirPath The path to the extracted zip directory - * @param events The set of science events to compare with the - * content of the CSV file + * @param events The set of science events to compare with the content of the CSV file */ private void assertScienceEventsCSVFile(Path extractedZipDirPath, Set events) { assertThat(extractedZipDirPath).isDirectoryContaining(path -> "science_events.csv".equals(path.getFileName().toString())); @@ -410,8 +406,7 @@ private void assertCorrectContentForExercise(Path exerciseDirPath, boolean cours .isDirectoryContaining(path -> path.getFileName().toString().contains("plagiarism_case") && path.getFileName().toString().endsWith(FILE_FORMAT_CSV)); } } - // only include automatic test feedback if the assessment due date is in the - // future + // only include automatic test feedback if the assessment due date is in the future if (exerciseDirPath.toString().contains("Programming") && assessmentDueDateInTheFuture && courseExercise) { var fileContentResult1 = Files.readString(getProgrammingResultsFilePath(exerciseDirPath, true)); // automatic feedback @@ -644,7 +639,7 @@ void testDataExportContainsDataAboutCourseStudentUnenrolled() throws Exception { var course = prepareCourseDataForDataExportCreation(assessmentDueDateInTheFuture, courseShortName); conversationUtilService.addOneMessageForUserInCourse(TEST_PREFIX + "student1", course, "only one post"); var dataExport = initDataExport(); - // by setting the course groups to a different value we simulate unenrollment + // by setting the course groups to a different value, we simulate unenrollment // because the user is no longer part of the user group and hence, the course. courseUtilService.updateCourseGroups("abc", course, ""); dataExportCreationService.createDataExport(dataExport);