1
0
forked from PGL/Clyde

added a InscriptionRequest to POST /mock

This commit is contained in:
Bartha Maxime 2024-03-18 11:33:50 +01:00
parent 93c161be4c
commit fd18df7c3a

View File

@ -22,16 +22,19 @@ public class MockController {
public final CurriculumCourseService CurriculumCourseService; public final CurriculumCourseService CurriculumCourseService;
public final CurriculumService curriculumService; public final CurriculumService curriculumService;
public final CourseService courseService; public final CourseService courseService;
public final InscriptionService inscriptionService;
ArrayList<User> mockUsers; ArrayList<User> 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.tokenRepo = tokenRepo;
this.userRepo = userRepo; this.userRepo = userRepo;
this.tokenService = tokenService; this.tokenService = tokenService;
this.CurriculumCourseService = CurriculumCourseService; this.CurriculumCourseService = CurriculumCourseService;
this.curriculumService = curriculumService; this.curriculumService = curriculumService;
this.courseService = courseService; this.courseService = courseService;
this.inscriptionService = inscriptionService;
} }
/** Saves an example of each user type by : /** 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,commun));
CurriculumCourseService.save(new CurriculumCourse(chemistryBab1,chemistry1)); 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);
} }
} }