Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
potaotototo committed Nov 2, 2024
1 parent f49b6e2 commit ff22c69
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/java/tuteez/model/person/lesson/DayTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class DayTest {

@Test
public void isValidDay_validInputs_returnsTrue() {
// EP: fully spelt out weekdays
assertTrue(Day.isValidDay("monday"));
assertTrue(Day.isValidDay("tuesday"));
assertTrue(Day.isValidDay("wednesday"));
Expand All @@ -18,6 +19,7 @@ public void isValidDay_validInputs_returnsTrue() {
assertTrue(Day.isValidDay("saturday"));
assertTrue(Day.isValidDay("sunday"));

// EP: short form for weekdays
assertTrue(Day.isValidDay("mon"));
assertTrue(Day.isValidDay("tue"));
assertTrue(Day.isValidDay("wed"));
Expand All @@ -26,6 +28,7 @@ public void isValidDay_validInputs_returnsTrue() {
assertTrue(Day.isValidDay("sat"));
assertTrue(Day.isValidDay("sun"));

// EP: random capitalisation of weekdays
assertTrue(Day.isValidDay("Monday"));
assertTrue(Day.isValidDay("TUESDAY"));
assertTrue(Day.isValidDay("wEdNeSdAy"));
Expand All @@ -35,12 +38,14 @@ public void isValidDay_validInputs_returnsTrue() {

@Test
public void isValidDay_invalidInputs_returnsFalse() {
// EP: invalid string inputs
assertFalse(Day.isValidDay("not a day"));
assertFalse(Day.isValidDay("mon day"));
assertFalse(Day.isValidDay("mondays"));
assertFalse(Day.isValidDay("tues"));
assertFalse(Day.isValidDay("thur"));

// EP: empty input
assertFalse(Day.isValidDay(""));
assertFalse(Day.isValidDay(" "));
assertFalse(Day.isValidDay("\t"));
Expand Down

0 comments on commit ff22c69

Please sign in to comment.