Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRAD2-1704 #515

Merged
merged 2 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package ca.bc.gov.educ.api.gradalgorithm.dto;

import java.util.UUID;

import lombok.Data;
import org.springframework.stereotype.Component;

import lombok.Data;
import java.util.UUID;

@Data
@Component
Expand All @@ -17,7 +16,7 @@ public class TranscriptMessage {
private String gradDateMessage;
private String honourNote;
private String adIBProgramMessage;
private String programCadre;
private String frenchImmersionMessage;
private String careerProgramMessage;
private String gradProjectedMessage;
private String honourProjectedNote;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import ca.bc.gov.educ.api.gradalgorithm.service.caching.GradProgramService;
import ca.bc.gov.educ.api.gradalgorithm.service.caching.GradSchoolService;
import ca.bc.gov.educ.api.gradalgorithm.service.caching.StudentGraduationService;
import ca.bc.gov.educ.api.gradalgorithm.util.*;
import ca.bc.gov.educ.api.gradalgorithm.util.APIUtils;
import ca.bc.gov.educ.api.gradalgorithm.util.GradAlgorithmApiUtils;
import ca.bc.gov.educ.api.gradalgorithm.util.JsonTransformer;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.commons.lang3.tuple.Pair;
Expand Down Expand Up @@ -819,7 +821,7 @@ private void createCompleteGradMessage(StringBuilder currentGradMessage, Transcr
}

if(!optPrograms.isEmpty() && opMessage.equalsIgnoreCase(GRADUATED)) {
currentGradMessage.append(String.format(result.getProgramCadre(),String.join(",", optPrograms)));
currentGradMessage.append(String.format(result.getFrenchImmersionMessage(),String.join(",", optPrograms)));
appendPeriod(currentGradMessage);
}
if(ruleProcessorData.getGradProgram().getProgramCode().contains("-PF") && dualDogwoodGraduated && opMessage.equalsIgnoreCase(GRADUATED)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package ca.bc.gov.educ.api.gradalgorithm.service;

import static org.junit.Assert.assertNotNull;
import java.util.*;
import ca.bc.gov.educ.api.gradalgorithm.EducGradAlgorithmTestBase;
import ca.bc.gov.educ.api.gradalgorithm.dto.*;
import ca.bc.gov.educ.api.gradalgorithm.service.caching.GradProgramService;
import ca.bc.gov.educ.api.gradalgorithm.service.caching.GradSchoolService;
Expand All @@ -14,9 +13,12 @@
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import ca.bc.gov.educ.api.gradalgorithm.EducGradAlgorithmTestBase;
import reactor.core.publisher.Mono;

import java.util.*;

import static org.junit.Assert.assertNotNull;

@RunWith(SpringRunner.class)
@SpringBootTest
@ActiveProfiles("test")
Expand Down Expand Up @@ -608,7 +610,7 @@ public void testGraduateStudent_projected() throws Exception {
msg.setGradMainMessage("ASdasdad");
msg.setHonourNote("asda");
msg.setMessageTypeCode(msgType);
msg.setProgramCadre("Adasd");
msg.setFrenchImmersionMessage("Adasd");
msg.setProgramCode(gradProgram);
msg.setTranscriptMessageID(new UUID(1, 1));
msg.setGradProjectedMessage("asdadad");
Expand Down Expand Up @@ -666,7 +668,7 @@ public void testGraduateStudent_projected_SCCP() throws Exception {
msg.setGradMainMessage("ASdasdad");
msg.setHonourNote("asda");
msg.setMessageTypeCode(msgType);
msg.setProgramCadre("Adasd");
msg.setFrenchImmersionMessage("Adasd");
msg.setGradProjectedMessage("sdada");
msg.setProgramCode(gradProgram);
msg.setTranscriptMessageID(new UUID(1, 1));
Expand Down Expand Up @@ -729,7 +731,7 @@ public void testGraduateStudent_projected_SCCP_withFutureDate() throws Exception
msg.setGradMainMessage("ASdasdad");
msg.setHonourNote("asda");
msg.setMessageTypeCode(msgType);
msg.setProgramCadre("Adasd");
msg.setFrenchImmersionMessage("Adasd");
msg.setGradProjectedMessage("sdada");
msg.setProgramCode(gradProgram);
msg.setTranscriptMessageID(new UUID(1, 1));
Expand Down
4 changes: 2 additions & 2 deletions api/src/test/resources/json/studentgraduation.json
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@
"gradDateMessage": "Graduation Date: %s",
"honourNote": "Based on the information provided by the school, this student has graduated in the %s with Honours.",
"adIBProgramMessage": "This student has also participated in: %s",
"programCadre": "This student has also successfully completed the %s Program",
"frenchImmersionMessage": "This student has also successfully completed the %s Program",
"careerProgramMessage": "This student has participated in Career Program(s): %s",
"gradProjectedMessage": "Based on the information provided by the school, this student should be able to graduate on the %s",
"honourProjectedNote": "Based on the information provided by the school, this student should be able to graduate on the %s with honours",
Expand All @@ -871,7 +871,7 @@
"gradDateMessage": null,
"honourNote": null,
"adIBProgramMessage": "This student is also participating in: %s",
"programCadre": "This student is also participating in the %s Program",
"frenchImmersionMessage": "This student is also participating in the %s Program",
"careerProgramMessage": "This student is participating in Career Program(s): %s",
"gradProjectedMessage": "Based on the information provided by the school, this student cannot satisfy the requirements for the %s.",
"honourProjectedNote": null,
Expand Down
Loading