1
0
forked from PGL/Clyde

Implements the RegNo feature

This commit is contained in:
2024-04-15 20:57:29 +02:00
parent 61eac8959a
commit 451944e4fb
6 changed files with 69 additions and 9 deletions

View File

@ -23,7 +23,7 @@ import java.util.Date;
public class MockController {
private final BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
public final UserService userService;
public final UserRepository userRepo;
public final TokenRepository tokenRepo;
public final TokenService tokenService;
@ -40,7 +40,8 @@ public class MockController {
public final ScholarshipRequestRepository scholarshipRequestRepository;
public MockController(UserRepository userRepo, TokenRepository tokenRepo, TokenService tokenService, CurriculumCourseService CurriculumCourseService, CurriculumService curriculumService, CourseService courseService, ExternalCurriculumRepository externalCurriculumRepository, InscriptionService inscriptionService, UserCurriculumRepository ucr, MinervalRepository minervalRepository, ScholarshipRequestRepository scholarshipRequestRepository){
public MockController(UserService userService, UserRepository userRepo, TokenRepository tokenRepo, TokenService tokenService, CurriculumCourseService CurriculumCourseService, CurriculumService curriculumService, CourseService courseService, ExternalCurriculumRepository externalCurriculumRepository, InscriptionService inscriptionService, UserCurriculumRepository ucr, MinervalRepository minervalRepository, ScholarshipRequestRepository scholarshipRequestRepository){
this.userService = userService;
this.tokenRepo = tokenRepo;
this.userRepo = userRepo;
this.tokenService = tokenService;
@ -73,7 +74,7 @@ public class MockController {
User popo = new User("Smith", "Paul", "paulsmith@gmail.com", "306 rue du poulet", "belgique", new Date(0), null, Role.Student, passwordEncoder.encode("jesuispaulleroi"));
mockUsers = new ArrayList<>(Arrays.asList(herobrine,joe,meh,joke,lena,jojo, popo));
userRepo.saveAll(mockUsers);
userService.saveAll(mockUsers);
Minerval minerval = new Minerval(joe.getRegNo(), 0, 852, 2023);
minervalRepository.save(minerval);