Skip to content

Commit

Permalink
Merge pull request #314 from bcgov/feature/GRAD2-2853
Browse files Browse the repository at this point in the history
GRAD2-2853: fixed the broken grad algorithm due to the name change on…
  • Loading branch information
infstar authored Aug 30, 2024
2 parents 7fe6aed + 42a890b commit aabca9f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@Data
@Component
public class CourseAlgorithmData {
List<TraxStudentCourse> traxStudentCours;
List<TraxStudentCourse> studentCourses;
List<CourseRequirement> courseRequirements;
List<CourseRestriction> courseRestrictions;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public CourseAlgorithmData getCourseAlgorithmData(String pen, boolean sortForUI)

// Student Courses
List<TraxStudentCourse> traxStudentCours = traxStudentCourseService.getStudentCourseList(pen, sortForUI);
courseAlgorithmData.setTraxStudentCours(traxStudentCours);
courseAlgorithmData.setStudentCourses(traxStudentCours);
if (!traxStudentCours.isEmpty()) {
List<String> courseCodes = traxStudentCours.stream()
.map(TraxStudentCourse::getCourseCode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void testGetCourseAlgorithmDataByPen() {

// Course Algorithm Data
CourseAlgorithmData courseAlgorithmData = new CourseAlgorithmData();
courseAlgorithmData.setTraxStudentCours(Arrays.asList(traxStudentCourse));
courseAlgorithmData.setStudentCourses(Arrays.asList(traxStudentCourse));
courseAlgorithmData.setCourseRequirements(Arrays.asList(courseRequirement));
courseAlgorithmData.setCourseRestrictions(Arrays.asList(courseRestriction));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void testGetCourseAlgorithmData_whenGivenPenNumber_thenReturnSuccess() {

// Course Algorithm Data
CourseAlgorithmData courseAlgorithmData = new CourseAlgorithmData();
courseAlgorithmData.setTraxStudentCours(Arrays.asList(traxStudentCourse));
courseAlgorithmData.setStudentCourses(Arrays.asList(traxStudentCourse));
courseAlgorithmData.setCourseRequirements(Arrays.asList(courseRequirement));
courseAlgorithmData.setCourseRestrictions(Arrays.asList(courseRestriction));

Expand All @@ -104,7 +104,7 @@ public void testGetCourseAlgorithmData_whenGivenPenNumber_thenReturnSuccess() {
var result = courseAlgorithmService.getCourseAlgorithmData(traxStudentCourse.getPen(), false);

assertThat(result).isNotNull();
assertThat(result.getTraxStudentCours().isEmpty()).isFalse();
assertThat(result.getStudentCourses().isEmpty()).isFalse();
assertThat(result.getCourseRequirements().isEmpty()).isFalse();
assertThat(result.getCourseRestrictions().isEmpty()).isFalse();
}
Expand Down

0 comments on commit aabca9f

Please sign in to comment.