forked from nus-cs2103-AY2021S1/ip
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Jiang
committed
Aug 27, 2020
1 parent
bd71428
commit cd340ed
Showing
2 changed files
with
34 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package duke; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class DeadlineTest { | ||
@Test | ||
public void Test() { | ||
String dateTime1 = "2020/08/27 2359"; | ||
String dateTime2; | ||
Deadline deadline = new Deadline("CS2103", false, dateTime1); | ||
try { | ||
deadline.updateDateTime(); | ||
} catch (DukeException e) { | ||
e.printStackTrace(); | ||
} | ||
dateTime2 = deadline.deadline; | ||
assertEquals(dateTime1, dateTime2); | ||
} | ||
} |
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,14 @@ | ||
package duke; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class ParserTest { | ||
@Test | ||
public void Test() { | ||
String input = "event"; | ||
Parser parser = new Parser(); | ||
Instruction instruction = parser.load(input); | ||
assertEquals(instruction, Instruction.EVENT); | ||
} | ||
} |