Skip to content

Commit

Permalink
changed to new task obj
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevan0102 committed Oct 28, 2015
1 parent 5323f9e commit 639dbf6
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 59 deletions.
3 changes: 1 addition & 2 deletions Alt4.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
floating;meeting tonight;null;null;null;null;false;
deadline;report submission;null;28/10/2015;null;2359;false;
deadline;dinner;-;28/10/2015;-;2259;false;28/10/2015;
14 changes: 7 additions & 7 deletions src/test/logic/AddTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ public class AddTest {
public static final String TYPE_EVENT = "event";
public static final String TYPE_FLOATING = "floating";

Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true);
Task task7 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false);
Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true, false);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false, false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true, false);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true, false);
Task task7 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false);
Storage storage = Storage.getInstance();
Command command1 = new Add(task1, storage);
Command command2 = new Add(task2, storage);
Expand Down
15 changes: 7 additions & 8 deletions src/test/logic/CompleteTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ public class CompleteTest {
public static final String TYPE_EVENT = "event";
public static final String TYPE_FLOATING = "floating";

Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true);
Task task7 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false);
Storage storage = Storage.getInstance();
Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true, false);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false, false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true, false);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true, false);
Task task7 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false); Storage storage = Storage.getInstance();
Command command1 = new Add(task1, storage);
Command command2 = new Add(task2, storage);
Command command3 = new Add(task3, storage);
Expand Down
14 changes: 7 additions & 7 deletions src/test/logic/DeleteTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ public class DeleteTest {
public static final String TYPE_EVENT = "event";
public static final String TYPE_FLOATING = "floating";

Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true);
Storage storage = Storage.getInstance();
Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true, false);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false, false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true, false);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true, false);
Task task7 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false); Storage storage = Storage.getInstance();
Command command1 = new Add(task1, storage);
Command command2 = new Add(task2, storage);
Command command3 = new Add(task3, storage);
Expand Down
14 changes: 7 additions & 7 deletions src/test/logic/DisplayTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ public class DisplayTest {
public static final String TYPE_EVENT = "event";
public static final String TYPE_FLOATING = "floating";

Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true);
Storage storage = Storage.getInstance();
Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true, false);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false, false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true, false);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true, false);
Task task7 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false); Storage storage = Storage.getInstance();
Command command1 = new Add(task1, storage);
Command command2 = new Add(task2, storage);
Command command3 = new Add(task3, storage);
Expand Down
16 changes: 8 additions & 8 deletions src/test/logic/IncompleteTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ public class IncompleteTest {
public static final String TYPE_EVENT = "event";
public static final String TYPE_FLOATING = "floating";

Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true);
Task task7 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false);
Task task8 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true);
Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true, false);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false, false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true, false);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true, false);
Task task7 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false);
Task task8 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true, false);

Storage storage = Storage.getInstance();
Command command1 = new Add(task1, storage);
Expand Down
14 changes: 7 additions & 7 deletions src/test/logic/SortTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public class SortTest {
public static final String TYPE_EVENT = "event";
public static final String TYPE_FLOATING = "floating";

Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true);

Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true, false);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false, false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true, false);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true, false);
Task task7 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false);
ArrayList<Task> sortList = new ArrayList<Task>();
ArrayList<Task> sortResult = new ArrayList<Task>();
ArrayList<Task> expected = new ArrayList<Task>();
Expand Down
13 changes: 7 additions & 6 deletions src/test/logic/UpdateTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ public class UpdateTest {
public static final String TYPE_EVENT = "event";
public static final String TYPE_FLOATING = "floating";

Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true);
Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true, false);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false, false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true, false);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true, false);
Task task7 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false);
Storage storage = Storage.getInstance();
Command command1 = new Add(task1, storage);
Command command2 = new Add(task2, storage);
Expand Down
14 changes: 7 additions & 7 deletions src/test/resources/DataDisplayTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ public class DataDisplayTest {
public static final String TYPE_FLOATING = "floating";

// initialize different task object that fits different requirement
Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true);

Task task1 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false);
Task task2 = new Task(TYPE_DEADLINE, "wash face with cool water", null, "02/02/2015", null, "1100", true, false);
Task task3 = new Task(TYPE_EVENT, "go toilet", "01/01/2015", "01/02/2015", "0900", "1000", false, false);
Task task4 = new Task(TYPE_EVENT, "wash hand with soap", "03/02/2015", "03/02/2015", "0915", "1100", true, false);
Task task5 = new Task(TYPE_FLOATING, "meet with bob", null, null, null, null, false, false);
Task task6 = new Task(TYPE_FLOATING, "eat breakfast", null, null, null, null, true, false);
Task task7 = new Task(TYPE_DEADLINE, "wake up", null, "01/01/2015", null, "0900", false, false);
// expected print format for each task
String task1Print = "By 0900, 01/01/2015: wake up";
String task2Print = "By 1100, 02/02/2015: wash face with cool water";
Expand Down

0 comments on commit 639dbf6

Please sign in to comment.