fix: Request validation in UserService

This commit is contained in:
Piotr Dec 2024-05-22 23:28:22 +02:00
parent 1eee6b1b48
commit 7e38b5a2e0
Signed by: stawros
GPG key ID: F89F27AD8F881A91
9 changed files with 126 additions and 26 deletions

View file

@ -23,8 +23,11 @@ public class EntityCreator {
return new UserEntityBuilder();
}
public static UserCreateRequest userRequest() {
return new UserCreateRequest(Constants.NAME, Constants.SURNAME, Constants.PESEL, Constants.PLN);
public static UserCreateRequest.UserCreateRequestBuilder userRequest() {
return UserCreateRequest.builder().name(Constants.NAME)
.surname(Constants.SURNAME)
.pesel(Constants.PESEL)
.pln(Constants.PLN);
}
public static class UserEntityBuilder {