Skip to content

Commit

Permalink
Fix codecov issues
Browse files Browse the repository at this point in the history
  • Loading branch information
leepoeaik committed Mar 25, 2024
1 parent ff1347d commit 6a47a65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/ui/StudentCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public StudentCard(Student student, int displayedIndex) {
remark.setText(student.getRemark().value);
student.getLessons().stream()
.sorted(Comparator.comparing(Lesson::getLessonValue))
.filter(x -> x.getLessonStatus() == 0)
.filter(lesson -> lesson.getLessonStatus() == 0)
.forEach(lesson -> lessons.getChildren().add(new Label(lesson.toString())));

Check warning on line 65 in src/main/java/seedu/address/ui/StudentCard.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/seedu/address/ui/StudentCard.java#L65

Added line #L65 was not covered by tests
}
}
6 changes: 6 additions & 0 deletions src/test/java/seedu/address/model/student/LessonTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,10 @@ public void getLessonStatusIsValid() {
Lesson lesson2 = new Lesson("Math|01-01-2023|09:00|1");
assertEquals(lesson2.getLessonStatus(), 1);
}

@Test
public void toStringTest() {
Lesson lesson = new Lesson("Math|01-01-2023|09:00|0");
assertEquals(lesson.toString(), "Math 2023-01-01 09:00");
}
}

0 comments on commit 6a47a65

Please sign in to comment.