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
Showing
6 changed files
with
68 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import org.junit.jupiter.api.Test; | ||
import java.time.LocalDate; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class DeadlineTest { | ||
@Test | ||
void toStringTest() { | ||
Deadline dummyDeadline = new Deadline("study for exam", LocalDate.parse("2020-12-12")); | ||
assertEquals("[D]" + "[\u2718]" + " study for exam" + | ||
"(by: 12 Dec 2020)", dummyDeadline.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class DukeTest { | ||
@Test | ||
void dummyTest() { | ||
assertEquals(2,2); | ||
} | ||
} |
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,16 @@ | ||
import org.junit.jupiter.api.Test; | ||
import java.util.ArrayList; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
|
||
public class EventCommandTest { | ||
@Test | ||
void executeTest() throws WrongDateFormatException, InvalidTaskDescriptionException { | ||
UI dukeUI = new UI(); | ||
TaskList tasks = new TaskList(new ArrayList<>(){}); | ||
EventCommand dummyEventCmd = new EventCommand("event read book/2020-12-12"); | ||
dummyEventCmd.execute(tasks, dukeUI); | ||
assertEquals("[E]" + "[\u2718]" + " read book" + | ||
" (at: 12 Dec 2020)", tasks.getTaskList().get(0).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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.time.LocalDate; | ||
import java.util.ArrayList; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class TaskListTest { | ||
@Test | ||
void addTaskTest() { | ||
TaskList tasks = new TaskList(new ArrayList<>()); | ||
Deadline dummyDeadline = new Deadline("get drunk", LocalDate.parse("2020-12-25")); | ||
tasks.addTask(dummyDeadline); | ||
assertEquals(dummyDeadline, tasks.getTaskList().get(0)); | ||
} | ||
} |
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,10 @@ | ||
import org.junit.jupiter.api.Test; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class TodoTest { | ||
@Test | ||
void toStringTest() { | ||
Todo dummyTodo = new Todo("go on date with gf"); | ||
assertEquals("[T]" + "[\u2718]" + " go on date with gf", dummyTodo.toString()); | ||
} | ||
} |