From 024a5ea23d7f17d182576f0d2b11a019a4e3b8a9 Mon Sep 17 00:00:00 2001 From: Stanislav Marszalek Date: Tue, 27 Jul 2021 09:14:02 +0200 Subject: O1 PM Bulk support - Start and End date changes Issue-ID: INT-1945 Signed-off-by: Stanislav Marszalek Change-Id: I02d3684c98d563d7f386de2fdf032e930ac44b3f --- .../service/fileready/FileReadyEventServiceTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/test/java/org') diff --git a/src/test/java/org/onap/a1pesimulator/service/fileready/FileReadyEventServiceTest.java b/src/test/java/org/onap/a1pesimulator/service/fileready/FileReadyEventServiceTest.java index 11ae637..18ab5c5 100644 --- a/src/test/java/org/onap/a1pesimulator/service/fileready/FileReadyEventServiceTest.java +++ b/src/test/java/org/onap/a1pesimulator/service/fileready/FileReadyEventServiceTest.java @@ -7,6 +7,7 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.nio.file.InvalidPathException; +import java.time.ZonedDateTime; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -33,8 +34,9 @@ class FileReadyEventServiceTest extends CommonFileReady { @Test void createFileReadyEventAndDeleteTmpFile() { - Mono fileMono = Mono.just(getTestFileData()); - FileData expectedFileData = fileReadyEventService.createFileReadyEvent(getTestFileData()); + FileData testData = getTestFileData(); + Mono fileMono = Mono.just(testData); + FileData expectedFileData = fileReadyEventService.createFileReadyEvent(testData); StepVerifier.create(fileReadyEventService.createFileReadyEventAndDeleteTmpFile(fileMono)) .expectNext(expectedFileData) .verifyComplete(); @@ -66,7 +68,8 @@ class FileReadyEventServiceTest extends CommonFileReady { */ private FileData getTestFileData() { try { - return FileData.builder().pmBulkFile(createTempFile(PM_BULK_FILE)).archivedPmBulkFile(createTempFile(ARCHIVED_PM_BULK_FILE)).build(); + return FileData.builder().pmBulkFile(createTempFile(PM_BULK_FILE)).startEventDate(ZonedDateTime.now()) + .endEventDate(ZonedDateTime.now().plusMinutes(5)).archivedPmBulkFile(createTempFile(ARCHIVED_PM_BULK_FILE)).build(); } catch (InvalidPathException e) { e.printStackTrace(); } -- cgit 1.2.3-korg