forked from nus-cs2103-AY2324S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de2e3d1
commit d3aaab9
Showing
5 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package seedu.address.model.person; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
import static seedu.address.logic.commands.CommandTestUtil.VALID_LEAVE; | ||
import static seedu.address.logic.commands.CommandTestUtil.INVALID_LEAVE; | ||
import static seedu.address.testutil.TypicalPersons.ALICE; | ||
import static seedu.address.testutil.TypicalPersons.BOB; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class LeaveTest { | ||
|
||
@Test | ||
public void validLeave() { | ||
assertEquals(new Leave().leave, Leave.NO_LEAVE); | ||
assertTrue(Leave.isValidLeave(ALICE.getLeave().leave)); | ||
assertTrue(Leave.isValidLeave(BOB.getLeave().leave)); | ||
assertTrue(Leave.isValidLeave(VALID_LEAVE)); | ||
assertFalse(Leave.isValidLeave(INVALID_LEAVE)); | ||
assertEquals(new Leave().toString(), "-"); | ||
assertEquals(ALICE.getLeave().leave, "111101010101"); | ||
assertEquals(ALICE.getLeave().toString(), "Jan, Feb, Mar, Apr, Jun, Aug, Oct, Dec"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters