BAEL-6572: Modified test based on review comments
This commit is contained in:
parent
1b1dab20ff
commit
a60c2eb944
@ -41,16 +41,14 @@ class LicenseMapperUnitTest {
|
|||||||
void givenLicenseDtoWithoutStartDateAndEndDate_WhenMapperMethodIsInvoked_ThenLicenseShouldBePopulatedWithDefaultDetails() {
|
void givenLicenseDtoWithoutStartDateAndEndDate_WhenMapperMethodIsInvoked_ThenLicenseShouldBePopulatedWithDefaultDetails() {
|
||||||
License license = licenseMapper.toLicense(LicenseDto.builder()
|
License license = licenseMapper.toLicense(LicenseDto.builder()
|
||||||
.build());
|
.build());
|
||||||
assertThat(license).isNotNull()
|
assertThat(license).isNotNull();
|
||||||
.satisfies(l -> {
|
assertThat(license.getStartDate()
|
||||||
assertThat(l.getStartDate()
|
.toLocalDate()).isEqualTo(LocalDate.now());
|
||||||
.toLocalDate()).isEqualTo(LocalDate.now());
|
assertThat(license.getEndDate()
|
||||||
assertThat(l.getEndDate()
|
.toLocalDate()).isEqualTo(LocalDate.now()
|
||||||
.toLocalDate()).isEqualTo(LocalDate.now()
|
.plusYears(1));
|
||||||
.plusYears(1));
|
assertThat(license.isActive()).isTrue();
|
||||||
assertThat(l.isActive()).isTrue();
|
assertThat(license.isRenewalRequired()).isFalse();
|
||||||
assertThat(l.isRenewalRequired()).isFalse();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user