From a60c2eb94441615b9c428361f6327827b83f44ff Mon Sep 17 00:00:00 2001 From: balasr3 Date: Wed, 23 Aug 2023 07:08:49 +0100 Subject: [PATCH] BAEL-6572: Modified test based on review comments --- .../mapper/LicenseMapperUnitTest.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/mapstruct/src/test/java/com/baeldung/expression/mapper/LicenseMapperUnitTest.java b/mapstruct/src/test/java/com/baeldung/expression/mapper/LicenseMapperUnitTest.java index 947e6a33c2..98f704e61c 100644 --- a/mapstruct/src/test/java/com/baeldung/expression/mapper/LicenseMapperUnitTest.java +++ b/mapstruct/src/test/java/com/baeldung/expression/mapper/LicenseMapperUnitTest.java @@ -41,16 +41,14 @@ class LicenseMapperUnitTest { void givenLicenseDtoWithoutStartDateAndEndDate_WhenMapperMethodIsInvoked_ThenLicenseShouldBePopulatedWithDefaultDetails() { License license = licenseMapper.toLicense(LicenseDto.builder() .build()); - assertThat(license).isNotNull() - .satisfies(l -> { - assertThat(l.getStartDate() - .toLocalDate()).isEqualTo(LocalDate.now()); - assertThat(l.getEndDate() - .toLocalDate()).isEqualTo(LocalDate.now() - .plusYears(1)); - assertThat(l.isActive()).isTrue(); - assertThat(l.isRenewalRequired()).isFalse(); - }); + assertThat(license).isNotNull(); + assertThat(license.getStartDate() + .toLocalDate()).isEqualTo(LocalDate.now()); + assertThat(license.getEndDate() + .toLocalDate()).isEqualTo(LocalDate.now() + .plusYears(1)); + assertThat(license.isActive()).isTrue(); + assertThat(license.isRenewalRequired()).isFalse(); } @Test