From fd18df7c3aaccf5a20d94a9b863a846c1bf433b0 Mon Sep 17 00:00:00 2001 From: Bartha Maxime <231026@umons.ac.be> Date: Mon, 18 Mar 2024 11:33:50 +0100 Subject: [PATCH] added a InscriptionRequest to POST /mock --- .../ovh/herisson/Clyde/EndPoints/MockController.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java index 358602b..6707fb7 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java @@ -22,16 +22,19 @@ public class MockController { public final CurriculumCourseService CurriculumCourseService; public final CurriculumService curriculumService; public final CourseService courseService; + + public final InscriptionService inscriptionService; ArrayList mockUsers; - public MockController(UserRepository userRepo, TokenRepository tokenRepo, TokenService tokenService, CurriculumCourseService CurriculumCourseService, CurriculumService curriculumService, CourseService courseService){ + public MockController(UserRepository userRepo, TokenRepository tokenRepo, TokenService tokenService, CurriculumCourseService CurriculumCourseService, CurriculumService curriculumService, CourseService courseService, InscriptionService inscriptionService){ this.tokenRepo = tokenRepo; this.userRepo = userRepo; this.tokenService = tokenService; this.CurriculumCourseService = CurriculumCourseService; this.curriculumService = curriculumService; this.courseService = courseService; + this.inscriptionService = inscriptionService; } /** Saves an example of each user type by : @@ -87,6 +90,11 @@ public class MockController { CurriculumCourseService.save(new CurriculumCourse(chemistryBab1,commun)); CurriculumCourseService.save(new CurriculumCourse(chemistryBab1,chemistry1)); + + InscriptionRequest inscriptionRequest = new InscriptionRequest("helen","prenom","non","helen@gmail.com","america",new Date(),(long) 1,RequestState.Refused,"yes.png","password"); + + inscriptionService.save(inscriptionRequest); + } }