forked from nus-cs2103-AY2425S1/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.
Add a user guide and product screenshot
- Loading branch information
Showing
13 changed files
with
93 additions
and
29 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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
T | 1 | sajbds | ||
T | 0 | shbf | ||
E | 0 | Tutorial 3 | 1pm | 3pm | ||
T | 0 | lab 1 | ||
T | 0 | lab 2 | ||
T | 0 | lab 3 | ||
E | 0 | Training | 9pm | 11pm | ||
T | 0 | Lab 5 | ||
D | 1 | proposal | Sep 19 2024 | ||
D | 1 | proposal | Sep 29 2024 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,57 @@ | ||
package reo.tasks; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import reo.storage.TaskStorage; | ||
|
||
import java.util.ArrayList; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class TaskParserTest { | ||
@Test | ||
public void parseTodoCommand_oneWord() { | ||
ArrayList<Task> tasks = new ArrayList<>(); | ||
TaskList taskList = new TaskList(tasks); | ||
TaskStorage storage = new TaskStorage("./data/reo.txt"); | ||
TaskParser parser = new TaskParser("todo Lab", taskList, storage); | ||
String response = parser.parse(); | ||
|
||
String expected = "I've added this todo:\n" + | ||
" [T] [ ] Lab\n"; | ||
assertEquals(response, expected); | ||
} | ||
|
||
@Test | ||
public void parseTodoCommand_manyWords() { | ||
ArrayList<Task> tasks = new ArrayList<>(); | ||
tasks.add(new Todo("Test Task 1", false)); | ||
tasks.add(new Todo("Test Task 2", true)); | ||
tasks.add(new Deadline("Test Deadline 1", false, "2024-09-14")); | ||
|
||
TaskList taskList = new TaskList(tasks); | ||
TaskStorage storage = new TaskStorage("./data/reo.txt"); | ||
TaskParser parser = new TaskParser("todo Lab 1, 2, 3, 4", taskList, storage); | ||
|
||
String response = parser.parse(); | ||
String expected = "I've added this todo:\n" + | ||
" [T] [ ] Lab 1, 2, 3, 4\n"; | ||
assertEquals(response, expected); | ||
} | ||
|
||
@Test | ||
public void parseTodoCommand_invalid() { | ||
ArrayList<Task> tasks = new ArrayList<>(); | ||
tasks.add(new Todo("Test Task 1", false)); | ||
tasks.add(new Todo("Test Task 2", true)); | ||
tasks.add(new Deadline("Test Deadline 1", false, "2024-09-14")); | ||
|
||
TaskList taskList = new TaskList(tasks); | ||
TaskStorage storage = new TaskStorage("./data/reo.txt"); | ||
TaskParser parser = new TaskParser("todo", taskList, storage); | ||
|
||
String response = parser.parse(); | ||
String expected = "Please enter a valid task name.\n"; | ||
|
||
assertEquals(response, expected); | ||
} | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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