feat: added new tests and fixed few issues
All checks were successful
Format / formatting (push) Successful in 7s
Build / build (push) Successful in 38s
CI / build (push) Successful in 12s

This commit is contained in:
Pierre Tellier
2025-03-19 12:05:01 +01:00
parent 52511dd4c4
commit 5ee3755548
4 changed files with 73 additions and 6 deletions

View File

@ -37,7 +37,6 @@ public class Entrepreneur extends User {
public Entrepreneur() {}
public Entrepreneur(
Long idUser,
String userSurname,
String username,
String primaryMail,
@ -46,7 +45,7 @@ public class Entrepreneur extends User {
String school,
String course,
boolean sneeStatus) {
super(idUser, userSurname, username, primaryMail, secondaryMail, phoneNumber);
super(userSurname, username, primaryMail, secondaryMail, phoneNumber);
this.school = school;
this.course = course;
this.sneeStatus = sneeStatus;

View File

@ -28,6 +28,8 @@ public class User {
public User() {}
// TODO: this should be removed as we shouldn't be able to chose the ID. Leaving it for
// compatibility purposes, as soon as it's not used anymore, delete it
public User(
Long idUser,
String userSurname,
@ -43,6 +45,19 @@ public class User {
this.phoneNumber = phoneNumber;
}
public User(
String userSurname,
String userName,
String primaryMail,
String secondaryMail,
String phoneNumber) {
this.userSurname = userSurname;
this.userName = userName;
this.primaryMail = primaryMail;
this.secondaryMail = secondaryMail;
this.phoneNumber = phoneNumber;
}
public Long getIdUser() {
return idUser;
}

View File

@ -91,7 +91,9 @@ public class AdminApiService {
newProject.getProjectAdministrator().updateListProject(newProject);
}
if (newProject.getEntrepreneurProposed() != null) {
newProject.getEntrepreneurProposed().setProjectProposed(newProject);
Entrepreneur proposed = newProject.getEntrepreneurProposed();
proposed.setProjectProposed(newProject);
proposed.setProjectParticipation(newProject);
}
newProject
.getListEntrepreneurParticipation()