diff options
author | Stanislav Marszalek <s.marszalek2@partner.samsung.com> | 2021-07-27 09:14:02 +0200 |
---|---|---|
committer | Stanislav Marszalek <s.marszalek2@partner.samsung.com> | 2021-07-28 13:04:28 +0000 |
commit | 024a5ea23d7f17d182576f0d2b11a019a4e3b8a9 (patch) | |
tree | 2b6aab31b1c0bb599f409c7756d3037d18aa73af /src/test/java/org | |
parent | 5995a778e7a5a7718c480a8099b9c2f47549530d (diff) |
O1 PM Bulk support - Start and End date changes
Issue-ID: INT-1945
Signed-off-by: Stanislav Marszalek <s.marszalek2@partner.samsung.com>
Change-Id: I02d3684c98d563d7f386de2fdf032e930ac44b3f
Diffstat (limited to 'src/test/java/org')
-rw-r--r-- | src/test/java/org/onap/a1pesimulator/service/fileready/FileReadyEventServiceTest.java | 9 |
1 files changed, 6 insertions, 3 deletions
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<FileData> fileMono = Mono.just(getTestFileData()); - FileData expectedFileData = fileReadyEventService.createFileReadyEvent(getTestFileData()); + FileData testData = getTestFileData(); + Mono<FileData> 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(); } |