From 814fefef0dfc1ebe63c36865110daae2e3ce5bea Mon Sep 17 00:00:00 2001 From: Jinil Sung Date: Thu, 26 Sep 2024 12:12:33 -0700 Subject: [PATCH] More coverages on schoolOfRecordId. More coverages on schoolOfRecordId. --- ...udentGraduationUpdateEventServiceTest.java | 37 +++++++++++++++++-- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/api/src/test/java/ca/bc/gov/educ/api/dataconversion/service/StudentGraduationUpdateEventServiceTest.java b/api/src/test/java/ca/bc/gov/educ/api/dataconversion/service/StudentGraduationUpdateEventServiceTest.java index 2419658..bb70697 100644 --- a/api/src/test/java/ca/bc/gov/educ/api/dataconversion/service/StudentGraduationUpdateEventServiceTest.java +++ b/api/src/test/java/ca/bc/gov/educ/api/dataconversion/service/StudentGraduationUpdateEventServiceTest.java @@ -339,8 +339,10 @@ public void testProcessTerminatedGraduatedStudentForGrad2018ENProgram_givenUpdat // Program & School String program = "2018-EN"; String mincode = "222333"; + UUID schoolOfRecordId = UUID.randomUUID(); String newMincode = "333444"; + UUID newSchoolOfRecordId = UUID.randomUUID(); String updateType = "UPD_GRAD"; @@ -351,6 +353,7 @@ public void testProcessTerminatedGraduatedStudentForGrad2018ENProgram_givenUpdat traxGraduationUpdate.setCitizenship("C"); traxGraduationUpdate.setStudentGrade("11"); traxGraduationUpdate.setSchoolOfRecord(newMincode); + traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId); traxGraduationUpdate.setStudentStatus("T"); traxGraduationUpdate.setArchiveFlag("A"); @@ -370,6 +373,7 @@ public void testProcessTerminatedGraduatedStudentForGrad2018ENProgram_givenUpdat currentStudent.setStudentStatus("TER"); currentStudent.setCitizenship("C"); currentStudent.setSchoolOfRecord(mincode); + currentStudent.setSchoolOfRecordId(schoolOfRecordId); currentStudent.setSchoolAtGrad(mincode); currentStudent.setGradDate("2022/02"); // Optional Program Codes @@ -404,8 +408,10 @@ public void testProcessDeceasedGraduatedStudentForGrad2018ENProgram_givenUpdated // Program & School String program = "2018-EN"; String mincode = "222333"; + UUID schoolOfRecordId = UUID.randomUUID(); String newMincode = "333444"; + UUID newSchoolOfRecordId = UUID.randomUUID(); String updateType = "UPD_GRAD"; @@ -416,6 +422,7 @@ public void testProcessDeceasedGraduatedStudentForGrad2018ENProgram_givenUpdated traxGraduationUpdate.setCitizenship("C"); traxGraduationUpdate.setStudentGrade("11"); traxGraduationUpdate.setSchoolOfRecord(newMincode); + traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId); traxGraduationUpdate.setStudentStatus("D"); traxGraduationUpdate.setArchiveFlag("I"); @@ -435,6 +442,7 @@ public void testProcessDeceasedGraduatedStudentForGrad2018ENProgram_givenUpdated currentStudent.setStudentStatus("DEC"); currentStudent.setCitizenship("C"); currentStudent.setSchoolOfRecord(mincode); + currentStudent.setSchoolOfRecordId(schoolOfRecordId); currentStudent.setSchoolAtGrad(mincode); currentStudent.setGradDate("2022/02"); // Optional Program Codes @@ -606,8 +614,10 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_whenGrad // Program & School String program = "2018-EN"; String mincode = "222333"; + UUID schoolOfRecordId = UUID.randomUUID(); String newMincode = "333444"; + UUID newSchoolOfRecordId = UUID.randomUUID(); String updateType = "UPD_GRAD"; @@ -618,6 +628,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_whenGrad traxGraduationUpdate.setCitizenship("C"); traxGraduationUpdate.setStudentGrade("11"); traxGraduationUpdate.setSchoolOfRecord(newMincode); + traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId); traxGraduationUpdate.setStudentStatus("T"); traxGraduationUpdate.setArchiveFlag("A"); @@ -637,6 +648,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_whenGrad currentStudent.setStudentStatus("ARC"); currentStudent.setCitizenship("C"); currentStudent.setSchoolOfRecord(mincode); + currentStudent.setSchoolOfRecordId(schoolOfRecordId); currentStudent.setSchoolAtGrad(mincode); // Optional Program Codes currentStudent.getProgramCodes().add("XC"); @@ -738,6 +750,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_whenCiti // Program & School String program = "2018-EN"; String mincode = "222333"; + UUID schoolOfRecordId = UUID.randomUUID(); String newCitizenship = "C"; @@ -749,6 +762,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_whenCiti traxGraduationUpdate.setGraduationRequirementYear("2018"); traxGraduationUpdate.setStudentGrade("12"); traxGraduationUpdate.setSchoolOfRecord(mincode); + traxGraduationUpdate.setSchoolOfRecordId(schoolOfRecordId); traxGraduationUpdate.setCitizenship(newCitizenship); traxGraduationUpdate.setStudentStatus("A"); traxGraduationUpdate.setArchiveFlag("I"); @@ -769,6 +783,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_whenCiti currentStudent.setStudentStatus("ARC"); currentStudent.setCitizenship(null); currentStudent.setSchoolOfRecord(mincode); + currentStudent.setSchoolOfRecordId(schoolOfRecordId); currentStudent.setSchoolAtGrad(mincode); currentStudent.setGradDate(null); // Optional Program Codes @@ -803,6 +818,7 @@ public void testProcessTerminatedStudentForGrad2018ENProgram_givenUpdated_whenCi // Program & School String program = "2018-EN"; String mincode = "222333"; + UUID schoolOfRecordId = UUID.randomUUID(); String newCitizenship = "C"; @@ -814,6 +830,7 @@ public void testProcessTerminatedStudentForGrad2018ENProgram_givenUpdated_whenCi traxGraduationUpdate.setGraduationRequirementYear("2018"); traxGraduationUpdate.setStudentGrade("12"); traxGraduationUpdate.setSchoolOfRecord(mincode); + traxGraduationUpdate.setSchoolOfRecordId(schoolOfRecordId); traxGraduationUpdate.setCitizenship(newCitizenship); traxGraduationUpdate.setStudentStatus("T"); traxGraduationUpdate.setArchiveFlag("A"); @@ -834,6 +851,7 @@ public void testProcessTerminatedStudentForGrad2018ENProgram_givenUpdated_whenCi currentStudent.setStudentStatus("TER"); currentStudent.setCitizenship(null); currentStudent.setSchoolOfRecord(mincode); + currentStudent.setSchoolOfRecordId(schoolOfRecordId); currentStudent.setSchoolAtGrad(mincode); currentStudent.setGradDate(null); // Optional Program Codes @@ -868,6 +886,7 @@ public void testProcessDeceasedStudentForGrad2018ENProgram_givenUpdated_whenCiti // Program & School String program = "2018-EN"; String mincode = "222333"; + UUID schoolOfRecordId = UUID.randomUUID(); String newCitizenship = "C"; @@ -879,6 +898,7 @@ public void testProcessDeceasedStudentForGrad2018ENProgram_givenUpdated_whenCiti traxGraduationUpdate.setGraduationRequirementYear("2018"); traxGraduationUpdate.setStudentGrade("12"); traxGraduationUpdate.setSchoolOfRecord(mincode); + traxGraduationUpdate.setSchoolOfRecordId(schoolOfRecordId); traxGraduationUpdate.setCitizenship(newCitizenship); traxGraduationUpdate.setStudentStatus("D"); traxGraduationUpdate.setArchiveFlag("I"); @@ -899,6 +919,7 @@ public void testProcessDeceasedStudentForGrad2018ENProgram_givenUpdated_whenCiti currentStudent.setStudentStatus("DEC"); currentStudent.setCitizenship(null); currentStudent.setSchoolOfRecord(mincode); + currentStudent.setSchoolOfRecordId(schoolOfRecordId); currentStudent.setSchoolAtGrad(mincode); currentStudent.setGradDate(null); // Optional Program Codes @@ -999,8 +1020,10 @@ public void testProcessArchivedNonGradStudentForGrad2018ENProgram_givenUpdated_w // Program & School String program = "2018-EN"; String mincode = "222333"; + UUID schoolOfRecordId = UUID.randomUUID(); String newMincode = "093444"; + UUID newSchoolOfRecordId = UUID.randomUUID(); String updateType = "UPD_GRAD"; @@ -1010,6 +1033,7 @@ public void testProcessArchivedNonGradStudentForGrad2018ENProgram_givenUpdated_w traxGraduationUpdate.setGraduationRequirementYear("2018"); traxGraduationUpdate.setStudentGrade("12"); traxGraduationUpdate.setSchoolOfRecord(newMincode); + traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId); traxGraduationUpdate.setStudentStatus("A"); traxGraduationUpdate.setArchiveFlag("I"); @@ -1028,6 +1052,7 @@ public void testProcessArchivedNonGradStudentForGrad2018ENProgram_givenUpdated_w currentStudent.setStudentGrade("12"); currentStudent.setStudentStatus("ARC"); currentStudent.setSchoolOfRecord(mincode); + currentStudent.setSchoolOfRecordId(schoolOfRecordId); currentStudent.setSchoolAtGrad(mincode); // Optional Program Codes currentStudent.getProgramCodes().add("XC"); @@ -1061,8 +1086,10 @@ public void testProcessDeceasedNonGradStudentForGrad2018ENProgram_givenUpdated_w // Program & School String program = "2018-EN"; String mincode = "222333"; + UUID schoolOfRecordId = UUID.randomUUID(); String newMincode = "093444"; + UUID newSchoolOfRecordId = UUID.randomUUID(); String updateType = "UPD_GRAD"; @@ -1072,6 +1099,7 @@ public void testProcessDeceasedNonGradStudentForGrad2018ENProgram_givenUpdated_w traxGraduationUpdate.setGraduationRequirementYear("2018"); traxGraduationUpdate.setStudentGrade("12"); traxGraduationUpdate.setSchoolOfRecord(newMincode); + traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId); traxGraduationUpdate.setStudentStatus("D"); traxGraduationUpdate.setArchiveFlag("I"); @@ -1090,6 +1118,7 @@ public void testProcessDeceasedNonGradStudentForGrad2018ENProgram_givenUpdated_w currentStudent.setStudentGrade("12"); currentStudent.setStudentStatus("DEC"); currentStudent.setSchoolOfRecord(mincode); + currentStudent.setSchoolOfRecordId(schoolOfRecordId); currentStudent.setSchoolAtGrad(mincode); // Optional Program Codes currentStudent.getProgramCodes().add("XC"); @@ -1529,10 +1558,6 @@ public void testProcessStudentForGrad2018ENProgram_whenException_isThrown_return // ID String pen = "111222333"; - // Program & School - String program = "2018-EN"; - String mincode = "222333"; - String updateType = "UPD_GRAD"; TraxGraduationUpdateDTO traxStudentUpdate = new TraxGraduationUpdateDTO(); @@ -1699,6 +1724,7 @@ public void testProcessArchivedNonGradStudentForSCCP_givenUpdated_whenSlpDateIsC // Program & School String program = "SCCP"; String mincode = "093333"; + UUID schoolOfRecordId = UUID.randomUUID(); String newSlpDate = "208006"; @@ -1730,6 +1756,7 @@ public void testProcessArchivedNonGradStudentForSCCP_givenUpdated_whenSlpDateIsC currentStudent.setStudentGrade("12"); currentStudent.setStudentStatus("ARC"); currentStudent.setSchoolOfRecord(mincode); + currentStudent.setSchoolOfRecordId(schoolOfRecordId); currentStudent.setSchoolAtGrad(mincode); // Optional Program Codes currentStudent.getProgramCodes().add("XC"); @@ -1764,6 +1791,7 @@ public void testProcessDeceasedNonGradStudentForSCCP_givenUpdated_whenSlpDateIsC // Program & School String program = "SCCP"; String mincode = "093333"; + UUID schoolOfRecordId = UUID.randomUUID(); String newSlpDate = "208006"; @@ -1795,6 +1823,7 @@ public void testProcessDeceasedNonGradStudentForSCCP_givenUpdated_whenSlpDateIsC currentStudent.setStudentGrade("12"); currentStudent.setStudentStatus("DEC"); currentStudent.setSchoolOfRecord(mincode); + currentStudent.setSchoolOfRecordId(schoolOfRecordId); currentStudent.setSchoolAtGrad(mincode); // Optional Program Codes currentStudent.getProgramCodes().add("XC");