test: fixes UserEntity builder
This commit is contained in:
parent
28ffe3f962
commit
b947f95305
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue