BAEL-6572: Modified test to validateId mapping

This commit is contained in:
balasr3
2023-09-05 10:04:58 +05:30
parent 77d1de223b
commit 2a7f3fbc54
2 changed files with 4 additions and 8 deletions
@@ -63,13 +63,15 @@ class LicenseMapperUnitTest {
}
@Test
void givenLicenseDtoWithValidDetails_WhenMapperMethodIsInvoked_ThenLicenseShouldBePopulatedWithValidId() {
void givenLicenseDtoWithoutId_WhenMapperMethodIsInvoked_ThenLicenseShouldBePopulatedWithValidId() {
LicenseDto licenseDto = new LicenseDto();
UUID id = UUID.randomUUID();
licenseDto.setId(id);
licenseDto.setEndDate(LocalDateTime.now()
.plusDays(10));
License license = licenseMapper.toLicense(licenseDto);
assertThat(license).isNotNull();
assertThat(license.getId()).isNotNull();
assertThat(license.getId()).isSameAs(id);
}
}