forked from nus-cs2103-AY2223S1/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
3 changed files
with
36 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
T;X; | ||
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,34 @@ | ||
package Duke.commands; | ||
|
||
import Duke.Storage; | ||
import Duke.TaskList; | ||
import Duke.tasks.Task; | ||
import Duke.tasks.Todo; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
public class TaskListTest { | ||
|
||
|
||
@Test | ||
public void add() { | ||
ArrayList<Task> tasks = new ArrayList<>(); | ||
Task tempTask = new Todo(""); | ||
TaskList taskList = new TaskList(tasks); | ||
Task addedTask = taskList.addTask(tempTask); | ||
assertNotNull(taskList); | ||
} | ||
|
||
@Test | ||
public void isValidTaskNumbertest() { | ||
TaskList taskList = new TaskList(Arrays.asList(null, null)); | ||
assertFalse(taskList.isValidTaskNumber(10)); | ||
} | ||
|
||
|
||
} | ||
|