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
@@ -4,7 +4,6 @@ import java.time.Duration;
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.util.UUID;
import org.mapstruct.AfterMapping;
import org.mapstruct.Mapper;
@@ -21,7 +20,6 @@ public interface LicenseMapper {
@Mapping(target = "endDate", ignore = true)
@Mapping(target = "active", constant = "true")
@Mapping(target = "renewalRequired", conditionExpression = "java(isEndDateInTwoWeeks(licenseDto))", source = ".")
@Mapping(target = "id", expression = "java(setId())")
License toLicense(LicenseDto licenseDto);
@AfterMapping
@@ -42,8 +40,4 @@ public interface LicenseMapper {
.toDays() <= 14;
}
default UUID setId() {
return UUID.randomUUID();
}
}