Skip to content

Commit

Permalink
sort courses by id before comparison (#13003)
Browse files Browse the repository at this point in the history
Co-authored-by: Dominic Lim <46486515+domlimm@users.noreply.github.com>
  • Loading branch information
cedricongjh and domlimm committed Apr 11, 2024
1 parent 2354975 commit fb7c4e8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/it/java/teammates/it/ui/webapi/GetCoursesActionIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public void testGetCoursesAction_withStudentEntityType_shouldReturnCorrectCourse
loginAsStudent(student.getGoogleId());

CoursesData courses = getValidCourses(params);
courses.getCourses().sort((c1, c2) -> c1.getCourseId().compareTo(c2.getCourseId()));
assertEquals(3, courses.getCourses().size());
Course expectedCourse1 = typicalBundle.courses.get("typicalCourse1");
Course expectedCourse2 = typicalBundle.courses.get("typicalCourse2");
Expand Down

0 comments on commit fb7c4e8

Please sign in to comment.