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() {
|
public UserEntity build() {
|
||||||
var nonnulPesel = Optional.ofNullable(pesel).orElse(Constants.NAME);
|
var nonnulPesel = Optional.ofNullable(pesel).orElse(Constants.PESEL);
|
||||||
List<CurrencyEntity> currencies = new ArrayList<>();
|
List<CurrencyEntity> currencies = new ArrayList<>();
|
||||||
if (pln > 0) {
|
if (pln > 0) {
|
||||||
currencies.add(new CurrencyEntity(nonnulPesel, "PLN", pln));
|
currencies.add(new CurrencyEntity(nonnulPesel, "PLN", pln));
|
||||||
|
@ -68,9 +68,9 @@ public class EntityCreator {
|
||||||
currencies.add(new CurrencyEntity(nonnulPesel, "PLN", Constants.PLN));
|
currencies.add(new CurrencyEntity(nonnulPesel, "PLN", Constants.PLN));
|
||||||
}
|
}
|
||||||
return new UserEntity(
|
return new UserEntity(
|
||||||
|
nonnulPesel,
|
||||||
Optional.ofNullable(name).orElse(Constants.NAME),
|
Optional.ofNullable(name).orElse(Constants.NAME),
|
||||||
Optional.ofNullable(surname).orElse(Constants.SURNAME),
|
Optional.ofNullable(surname).orElse(Constants.SURNAME),
|
||||||
nonnulPesel,
|
|
||||||
currencies
|
currencies
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue