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
12 changed files
with
85 additions
and
13 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
2 changes: 1 addition & 1 deletion
2
src/main/java/Duke/Deadlines.java → src/main/java/duke/Deadlines.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package Duke; | ||
package duke; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalTime; | ||
|
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,4 +1,4 @@ | ||
package Duke; | ||
package duke; | ||
|
||
import java.util.Scanner; | ||
import java.io.IOException; | ||
|
2 changes: 1 addition & 1 deletion
2
src/main/java/Duke/DukeException.java → src/main/java/duke/DukeException.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package Duke; | ||
package duke; | ||
|
||
public class DukeException extends Exception{ | ||
public DukeException(String message){ | ||
|
2 changes: 1 addition & 1 deletion
2
src/main/java/Duke/Events.java → src/main/java/duke/Events.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package Duke; | ||
package duke; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalTime; | ||
|
2 changes: 1 addition & 1 deletion
2
src/main/java/Duke/Storage.java → src/main/java/duke/Storage.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package Duke; | ||
package duke; | ||
|
||
import java.io.FileWriter; | ||
import java.nio.file.Files; | ||
|
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,62 @@ | ||
package duke; | ||
|
||
import org.junit.jupiter.api.AfterEach; | ||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.io.*; | ||
import java.util.ArrayList; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
public class TaskListTest { | ||
TaskList taskList; | ||
|
||
@BeforeEach | ||
public void setUp(){ | ||
taskList = new TaskList(new ArrayList<>()); | ||
} | ||
|
||
|
||
@Test | ||
public void dummyTest(){ | ||
assertEquals(2, 2); | ||
} | ||
|
||
@Test | ||
public void testAddToDo() throws DukeException { | ||
taskList.add("todo eat"); | ||
assertEquals(taskList.countList(),1); | ||
} | ||
|
||
@Test | ||
public void testAddDeadline() throws DukeException { | ||
taskList.add("deadline /by 27/08/2020 2359"); | ||
assertEquals(taskList.countList(),1); | ||
} | ||
|
||
@Test | ||
public void testAddEvent() throws DukeException { | ||
taskList.add("event sleep /at 28/08/2020 0000-0800"); | ||
assertEquals(taskList.countList(),1); | ||
} | ||
|
||
@Test | ||
public void delete() throws DukeException { | ||
taskList.add("event sleep /at 28/08/2020 0000-0800"); | ||
taskList.add("deadline /by 27/08/2020 2359"); | ||
taskList.delete("delete 1"); | ||
assertEquals(taskList.countList(),1); | ||
} | ||
|
||
@Test | ||
public void deleteAll() throws DukeException { | ||
taskList.add("event sleep /at 28/08/2020 0000-0800"); | ||
taskList.add("deadline /by 27/08/2020 2359"); | ||
taskList.add("todo eat"); | ||
taskList.delete("delete all"); | ||
assertEquals(taskList.countList(),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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package Duke; | ||
package duke; | ||
|
||
public class ToDo extends Task{ | ||
|
||
|
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,4 +1,4 @@ | ||
package Duke; | ||
package duke; | ||
|
||
import java.util.List; | ||
|
||
|
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