diff --git a/MyINPulse-back/src/main/java/enseirb/myinpulse/controller/EntrepreneurApi.java b/MyINPulse-back/src/main/java/enseirb/myinpulse/controller/EntrepreneurApi.java index 61bcdad..c0f3638 100644 --- a/MyINPulse-back/src/main/java/enseirb/myinpulse/controller/EntrepreneurApi.java +++ b/MyINPulse-back/src/main/java/enseirb/myinpulse/controller/EntrepreneurApi.java @@ -39,7 +39,7 @@ public class EntrepreneurApi { @RequestBody String content, @AuthenticationPrincipal Jwt principal) { entrepreneurApiService.editSectionCell( - sectionCellId, content, principal.getClaimAsString("email")); + sectionCellId, content, principal.getClaimAsString("email")); } /** @@ -52,7 +52,8 @@ public class EntrepreneurApi { @DeleteMapping("/entrepreneur/sectionCells/{sectionCellId}") public void removeSectionCell( @PathVariable Long sectionCellId, @AuthenticationPrincipal Jwt principal) { - entrepreneurApiService.removeSectionCell(sectionCellId, principal.getClaimAsString("email")); + entrepreneurApiService.removeSectionCell( + sectionCellId, principal.getClaimAsString("email")); } /** diff --git a/MyINPulse-back/src/test/java/enseirb/myinpulse/SharedApiServiceTest.java b/MyINPulse-back/src/test/java/enseirb/myinpulse/SharedApiServiceTest.java index 17c14df..63ad0a7 100644 --- a/MyINPulse-back/src/test/java/enseirb/myinpulse/SharedApiServiceTest.java +++ b/MyINPulse-back/src/test/java/enseirb/myinpulse/SharedApiServiceTest.java @@ -121,9 +121,8 @@ public class SharedApiServiceTest { // Assuming staticUnauthorizedMail is an entrepreneur NOT linked to staticAuthorizedProject // or staticUnauthorizedProject: when(mockUtilsService.isAllowedToCheckProject(eq(staticUnauthorizedMail), anyLong())) - .thenReturn( - false); // Unauthorized entrepreneur NOT allowed for ANY project ID by - // default + .thenReturn(false); // Unauthorized entrepreneur NOT allowed for ANY project ID by + // default // Add more specific mock setups here if needed for entrepreneur tests // E.g., If you have a test specifically for an entrepreneur accessing THEIR project: @@ -250,7 +249,7 @@ public class SharedApiServiceTest { sharedApiService.getSectionCells( staticAuthorizedProject .getIdProject(), // Project static user is not - // authorized for + // authorized for 1L, LocalDateTime.now() .format( @@ -626,9 +625,8 @@ public class SharedApiServiceTest { cell -> projectAppointmentsList.addAll( sectionCellService.getAppointmentsBySectionCellId( - cell - .getIdSectionCell()))); // Get appointments for - // those cells + cell.getIdSectionCell()))); // Get appointments for + // those cells Optional createdAppointmentOpt = projectAppointmentsList.stream() @@ -944,9 +942,7 @@ public class SharedApiServiceTest { .anyMatch( a -> a.getIdAppointment() - .equals( - otherApp - .getIdAppointment()))); // Ensure - // appointment from other project is not included + .equals(otherApp.getIdAppointment()))); // Ensure + // appointment from other project is not included } }