From 3e24f1acf9a07b9f37b47cd710d4ad7e486db818 Mon Sep 17 00:00:00 2001 From: soletsdev Date: Wed, 25 Sep 2024 08:59:50 -0700 Subject: [PATCH] fixing test and changing to localDateTime --- .../penreg/api/batch/processor/PenRegBatchProcessorTest.java | 2 +- .../java/ca/bc/gov/educ/penreg/api/rest/RestUtilsTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/test/java/ca/bc/gov/educ/penreg/api/batch/processor/PenRegBatchProcessorTest.java b/api/src/test/java/ca/bc/gov/educ/penreg/api/batch/processor/PenRegBatchProcessorTest.java index 9f8b9ca5..1da551c1 100644 --- a/api/src/test/java/ca/bc/gov/educ/penreg/api/batch/processor/PenRegBatchProcessorTest.java +++ b/api/src/test/java/ca/bc/gov/educ/penreg/api/batch/processor/PenRegBatchProcessorTest.java @@ -713,7 +713,7 @@ public void testProcessPenRegBatchFileFromTSW_GivenmincodeInvalidSchoolCloseDate @Transactional public void testProcessPenRegBatchFileFromTSW_GivenmincodeInvalidSchoolOpenDate_ShouldCreateRecordLOADFAILInDB() throws IOException { final School school = this.createMockSchool(); - school.setOpenedDate("2024-09-01T00:00:00"); + school.setOpenedDate(LocalDateTime.now().plusYears(1).toString()); when(this.restUtils.getSchoolByMincode(anyString())).thenReturn(Optional.of(school)); final File file = new File(Objects.requireNonNull(this.getClass().getClassLoader().getResource("sample_5_K12_OK.txt")).getFile()); final byte[] bFile = Files.readAllBytes(file.toPath()); diff --git a/api/src/test/java/ca/bc/gov/educ/penreg/api/rest/RestUtilsTest.java b/api/src/test/java/ca/bc/gov/educ/penreg/api/rest/RestUtilsTest.java index 6905f66e..2cbaa479 100644 --- a/api/src/test/java/ca/bc/gov/educ/penreg/api/rest/RestUtilsTest.java +++ b/api/src/test/java/ca/bc/gov/educ/penreg/api/rest/RestUtilsTest.java @@ -110,9 +110,9 @@ private GradeCode[] createGradeCodeArray() { private SchoolContactSearchWrapper createSchoolContactSearchWrapper() { SchoolContactSearchWrapper schoolSearchWrapper = new SchoolContactSearchWrapper(); schoolSearchWrapper.setContent(Arrays.asList( - SchoolContact.builder().email("expired@email.com").firstName("Joe").lastName("Blow").expiryDate(LocalDate.now().minusDays(1).toString()).build(), + SchoolContact.builder().email("expired@email.com").firstName("Joe").lastName("Blow").expiryDate(LocalDateTime.now().minusDays(1).toString()).build(), SchoolContact.builder().email("active@email.com").firstName("2").lastName("2").expiryDate(null).build(), - SchoolContact.builder().email("active@email.com").firstName("Joe").lastName("Blow").expiryDate(LocalDate.now().plusDays(1).toString()).build())); + SchoolContact.builder().email("active@email.com").firstName("Joe").lastName("Blow").expiryDate(LocalDateTime.now().plusDays(1).toString()).build())); return schoolSearchWrapper; }