diff --git a/MyINPulse-back/src/main/java/enseirb/myinpulse/service/SharedApiService.java b/MyINPulse-back/src/main/java/enseirb/myinpulse/service/SharedApiService.java index 810f66a..769a6cc 100644 --- a/MyINPulse-back/src/main/java/enseirb/myinpulse/service/SharedApiService.java +++ b/MyINPulse-back/src/main/java/enseirb/myinpulse/service/SharedApiService.java @@ -50,7 +50,9 @@ public class SharedApiService { EntrepreneurService entrepreneurService, SectionCellService sectionCellService, AppointmentService appointmentService, - UtilsService utilsService, EntrepreneurApi entrepreneurApi, AdminApi adminApi) { + UtilsService utilsService, + EntrepreneurApi entrepreneurApi, + AdminApi adminApi) { this.projectService = projectService; this.entrepreneurService = entrepreneurService; this.sectionCellService = sectionCellService; @@ -295,12 +297,12 @@ public class SharedApiService { sectionCell.updateAppointmentSectionCell(newAppointment); }); - /* + /* * On initial insertion, the resport value is null unless that report does already exist in the db somewhere * If a non null value is passed and it does not exist in db it will throw an exception - */ + */ if (newAppointment.getAppointmentReport() != null) { - newAppointment.getAppointmentReport().setAppointmentReport(newAppointment); + newAppointment.getAppointmentReport().setAppointmentReport(newAppointment); } } } diff --git a/MyINPulse-back/src/test/java/enseirb/myinpulse/SharedApiServiceTest.java b/MyINPulse-back/src/test/java/enseirb/myinpulse/SharedApiServiceTest.java index 621e0ef..d35842d 100644 --- a/MyINPulse-back/src/test/java/enseirb/myinpulse/SharedApiServiceTest.java +++ b/MyINPulse-back/src/test/java/enseirb/myinpulse/SharedApiServiceTest.java @@ -210,15 +210,13 @@ public class SharedApiServiceTest { } /* - * _____ _ ____ _ _ ____ _ _ + * _____ _ ____ _ _ ____ _ _ * |_ _|__ ___| |_/ ___| ___ ___| |_(_) ___ _ __ / ___|___| | | * | |/ _ \/ __| __\___ \ / _ \/ __| __| |/ _ \| '_ \| | / _ \ | | * | | __/\__ \ |_ ___) | __/ (__| |_| | (_) | | | | |__| __/ | | * |_|\___||___/\__|____/ \___|\___|\__|_|\___/|_| |_|\____\___|_|_| */ - - /* * Tests retrieving section cells for a specific project and section ID before a given date * when the user is authorized but no matching cells exist. @@ -309,17 +307,16 @@ public class SharedApiServiceTest { assertEquals(HttpStatus.UNAUTHORIZED, exception.getStatusCode()); } - /* - * _____ _ ____ _ ____ _ _ ____ - * |_ _|__ ___| |_ / ___| ___| |_| _ \ _ __ ___ (_) ___ ___| |_| __ ) _ _ + * _____ _ ____ _ ____ _ _ ____ + * |_ _|__ ___| |_ / ___| ___| |_| _ \ _ __ ___ (_) ___ ___| |_| __ ) _ _ * | |/ _ \/ __| __| | _ / _ \ __| |_) | '__/ _ \| |/ _ \/ __| __| _ \| | | | * | | __/\__ \ |_| |_| | __/ |_| __/| | | (_) | | __/ (__| |_| |_) | |_| | * _|_|\___||___/\__|\____|\___|\__|_| |_| \___// |\___|\___|\__|____/ \__, | - * |_ _| _ \ |__/ |___/ - * | || | | | - * | || |_| | - * |___|____/ + * |_ _| _ \ |__/ |___/ + * | || | | | + * | || |_| | + * |___|____/ */ /* @@ -360,18 +357,17 @@ public class SharedApiServiceTest { assertEquals(HttpStatus.UNAUTHORIZED, exception.getStatusCode()); } - /* - * _____ _ ____ _ _ _ _ ____ - * |_ _|__ ___| |_ / ___| ___| |_ / \ __| |_ __ ___ (_)_ __ | __ ) _ _ + * _____ _ ____ _ _ _ _ ____ + * |_ _|__ ___| |_ / ___| ___| |_ / \ __| |_ __ ___ (_)_ __ | __ ) _ _ * | |/ _ \/ __| __| | _ / _ \ __| / _ \ / _` | '_ ` _ \| | '_ \| _ \| | | | * | | __/\__ \ |_| |_| | __/ |_ / ___ \ (_| | | | | | | | | | | |_) | |_| | * _|_|\___||___/\__|\____|\___|\__/_/ \_\__,_|_| |_| |_|_|_| |_|____/ \__, | - * |_ _| _ \ |___/ - * | || | | | - * | || |_| | - * |___|____/ - * + * |_ _| _ \ |___/ + * | || | | | + * | || |_| | + * |___|____/ + * */ /* @@ -432,16 +428,16 @@ public class SharedApiServiceTest { } /* - * _____ _ - * |_ _|__ ___| |_ - * | |/ _ \/ __| __| - * | | __/\__ \ |_ - * |_|\___||___/\__| _ _ _ - * / \ _ __ _ __ ___ (_)_ __ | |_ ___ _ __ ___ ___ _ __ | |_ ___ + * _____ _ + * |_ _|__ ___| |_ + * | |/ _ \/ __| __| + * | | __/\__ \ |_ + * |_|\___||___/\__| _ _ _ + * / \ _ __ _ __ ___ (_)_ __ | |_ ___ _ __ ___ ___ _ __ | |_ ___ * / _ \ | '_ \| '_ \ / _ \| | '_ \| __/ _ \ '_ ` _ \ / _ \ '_ \| __/ __| * / ___ \| |_) | |_) | (_) | | | | | || __/ | | | | | __/ | | | |_\__ \ * /_/ \_\ .__/| .__/ \___/|_|_| |_|\__\___|_| |_| |_|\___|_| |_|\__|___/ - * |_| |_| + * |_| |_| */ /* @@ -487,7 +483,7 @@ public class SharedApiServiceTest { "Related Section Content Integrated", LocalDateTime.now())); - Report newReport = null;// getTestReport(reportContent); // Uses no-arg constructor + Report newReport = null; // getTestReport(reportContent); // Uses no-arg constructor Appointment newAppointment = getTestAppointment( @@ -710,7 +706,6 @@ public class SharedApiServiceTest { assertEquals(HttpStatus.UNAUTHORIZED, exception.getStatusCode()); } - // --- Test Methods (Use static data from @BeforeAll where possible) --- /*