test: fixes UserEntity builder

This commit is contained in:
Piotr Dec 2024-05-22 19:12:42 +02:00
parent 28ffe3f962
commit b947f95305
Signed by: stawros
GPG key ID: F89F27AD8F881A91

View file

@ -56,7 +56,7 @@ public class EntityCreator {
}
public UserEntity build() {
var nonnulPesel = Optional.ofNullable(pesel).orElse(Constants.NAME);
var nonnulPesel = Optional.ofNullable(pesel).orElse(Constants.PESEL);
List<CurrencyEntity> currencies = new ArrayList<>();
if (pln > 0) {
currencies.add(new CurrencyEntity(nonnulPesel, "PLN", pln));
@ -68,9 +68,9 @@ public class EntityCreator {
currencies.add(new CurrencyEntity(nonnulPesel, "PLN", Constants.PLN));
}
return new UserEntity(
nonnulPesel,
Optional.ofNullable(name).orElse(Constants.NAME),
Optional.ofNullable(surname).orElse(Constants.SURNAME),
nonnulPesel,
currencies
);
}