BAEL-6572: Modified test based on review comments

This commit is contained in:
balasr3
2023-08-22 21:07:19 +01:00
parent 56cba80a26
commit e6d5f167f1

View File

@@ -37,18 +37,6 @@ class LicenseMapperUnitTest {
.toLocalDate()).isEqualTo(LocalDate.now());
}
@Test
void givenLicenseDtoWithoutEndDateAndWithoutStartDate_WhenMapperMethodIsInvoked_ThenLicenseShouldBePopulatedWithDefaultStartDateAndEndDate() {
License license = licenseMapper.toLicense(LicenseDto.builder()
.build());
assertThat(license).isNotNull();
assertThat(license.getStartDate()
.toLocalDate()).isEqualTo(LocalDate.now());
assertThat(license.getEndDate()
.toLocalDate()).isEqualTo(LocalDate.now()
.plusYears(1));
}
@Test
void givenLicenseDtoWithoutStartDateAndEndDate_WhenMapperMethodIsInvoked_ThenLicenseShouldBePopulatedWithDefaultDetails() {
License license = licenseMapper.toLicense(LicenseDto.builder()