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
7 changed files
with
74 additions
and
8 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
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,14 @@ | ||
import main.java.Deadline; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.time.LocalDate; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class DeadlineTest { | ||
@Test | ||
public void toStringTest() { | ||
assertEquals("[D][\u2718] read book(by: Oct 09 2020)", | ||
new Deadline(" read book", LocalDate.of(2020, 10, 9)).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,12 @@ | ||
import main.java.Event; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class EventTest { | ||
@Test | ||
public void toStringTest() { | ||
assertEquals("[E][\u2718] read book(at: night)", | ||
new Event(" read book", " night").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,30 @@ | ||
import main.java.Event; | ||
import main.java.TaskList; | ||
import main.java.Task; | ||
import main.java.Todo; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.util.ArrayList; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class TaskListTest { | ||
@Test | ||
public void sizeTest() { | ||
ArrayList<Task> tasks = new ArrayList<>(); | ||
tasks.add(new Todo("read")); | ||
tasks.add(new Event("sleep", "noon")); | ||
TaskList taskList = new TaskList(tasks); | ||
assertEquals(2, taskList.size()); | ||
} | ||
|
||
@Test | ||
public void getTest() { | ||
ArrayList<Task> tasks = new ArrayList<>(); | ||
tasks.add(new Todo("read")); | ||
Event event = new Event("sleep", "noon"); | ||
tasks.add(event); | ||
TaskList taskList = new TaskList(tasks); | ||
assertEquals(event, taskList.get(1)); | ||
} | ||
} |