BAEL-6572: Added mapping for id and test, based on review comment

This commit is contained in:
balasr3
2023-09-04 07:34:28 +05:30
parent 0529c7f612
commit e4d766b808
2 changed files with 10 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ class LicenseMapperUnitTest {
licenseDto.setStartDate(LocalDateTime.now());
License license = licenseMapper.toLicense(licenseDto);
assertThat(license).isNotNull();
assertThat(license.getId()).isNotNull();
assertThat(license.getEndDate()
.toLocalDate()).isEqualTo(LocalDate.now()
.plusYears(1));
@@ -33,6 +34,7 @@ class LicenseMapperUnitTest {
.plusYears(2));
License license = licenseMapper.toLicense(licenseDto);
assertThat(license).isNotNull();
assertThat(license.getId()).isNotNull();
assertThat(license.getStartDate()
.toLocalDate()).isEqualTo(LocalDate.now());
}
@@ -42,6 +44,7 @@ class LicenseMapperUnitTest {
LicenseDto licenseDto = new LicenseDto();
License license = licenseMapper.toLicense(licenseDto);
assertThat(license).isNotNull();
assertThat(license.getId()).isNotNull();
assertThat(license.getStartDate()
.toLocalDate()).isEqualTo(LocalDate.now());
assertThat(license.getEndDate()
@@ -58,6 +61,7 @@ class LicenseMapperUnitTest {
.plusDays(10));
License license = licenseMapper.toLicense(licenseDto);
assertThat(license).isNotNull();
assertThat(license.getId()).isNotNull();
assertThat(license.isRenewalRequired()).isTrue();
}