fix: Fixed user persistence after exchange
This commit is contained in:
parent
71109174f7
commit
94dd43c138
6 changed files with 34 additions and 7 deletions
|
@ -25,6 +25,20 @@ class UserMapperTest {
|
|||
.isEqualTo(expected);
|
||||
}
|
||||
|
||||
@Test
|
||||
void pojoToEntityTest() {
|
||||
var entity = new User(
|
||||
EntityCreator.Constants.NAME,
|
||||
EntityCreator.Constants.SURNAME,
|
||||
EntityCreator.Constants.PESEL,
|
||||
Map.of("PLN", new Currency("PLN", EntityCreator.Constants.PLN))
|
||||
);
|
||||
var expected = EntityCreator.user().build();
|
||||
assertThat(UserMapper.pojoToEntity(entity))
|
||||
.usingRecursiveComparison()
|
||||
.isEqualTo(expected);
|
||||
}
|
||||
|
||||
@Test
|
||||
void requestToEntityTest() {
|
||||
var request = EntityCreator.userRequest().build();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue