-
Notifications
You must be signed in to change notification settings - Fork 454
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
Showing
15 changed files
with
261 additions
and
135 deletions.
There are no files selected for viewing
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
15 changes: 12 additions & 3 deletions
15
src/main/java/Deadline.java → src/main/java/duke/Deadline.java
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,9 @@ | ||
package duke; | ||
|
||
public class DukeException extends Exception { | ||
private final String description; | ||
|
||
DukeException(String description) { | ||
this.description = description; | ||
} | ||
} |
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,33 @@ | ||
package duke; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.testng.annotations.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class DukeTest { | ||
@Test | ||
public void dummyTest() { | ||
Assertions.assertEquals(2, 2); | ||
} | ||
|
||
@Test | ||
public void toDoTest() { | ||
Task test = new Todo("return book"); | ||
assertEquals("[T][ ] return book", test.toString()); | ||
} | ||
|
||
@Test | ||
public void toDoTest2() { | ||
Task test = new Todo("return book"); | ||
test.markAsDone(); | ||
assertEquals("[T][X] return book", test.toString()); | ||
} | ||
|
||
@Test | ||
public void EventTest() { | ||
Task test = new Event("bomb world trade center", "11/09/2001"); | ||
test.markAsDone(); | ||
assertEquals("[E][X] bomb world trade center (at:Sep 11 2001)", test.toString()); | ||
} | ||
} |
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
Oops, something went wrong.