Skip to content

Commit

Permalink
Change '\u2713' and '\u2717' into 'DONE' and 'NOT DONE'
Browse files Browse the repository at this point in the history
  • Loading branch information
neoruien committed Aug 25, 2020
1 parent 285cf03 commit 6ee9d23
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 25 deletions.
3 changes: 3 additions & 0 deletions src/main/java/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: duke.Duke

4 changes: 1 addition & 3 deletions src/main/java/duke/tasks/Task.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
public class Task {
public boolean isDone;
public String name;
public char tick = '\u2713';
public char cross = '\u2717';

public Task(String name) {
isDone = false;
Expand All @@ -21,6 +19,6 @@ public void markAsDone() {
}

public String toString() {
return String.format("[%c] %s", isDone ? tick : cross, name);
return String.format("[%s] %s", isDone ? "DONE" : "NOT DONE", name);
}
}
2 changes: 1 addition & 1 deletion src/test/java/duke/tasks/DeadlineTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class DeadlineTest {
@Test
public void testToString() {
Deadline deadline = new Deadline("return book", LocalDate.parse("2020-06-06", DateTimeFormatter.ofPattern("yyyy-MM-dd")));
String expected = "[D][] return book (by: Jun 06 2020)";
String expected = "[D][NOT DONE] return book (by: Jun 06 2020)";
assertEquals(expected, deadline.toString());
}
}
2 changes: 1 addition & 1 deletion src/test/java/duke/tasks/EventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class EventTest {
@Test
public void testToString() {
Event event = new Event("project meeting", LocalDate.parse("2020-08-06", DateTimeFormatter.ofPattern("yyyy-MM-dd")));
String expected = "[E][] project meeting (at: Aug 06 2020)";
String expected = "[E][NOT DONE] project meeting (at: Aug 06 2020)";
assertEquals(expected, event.toString());
}
}
2 changes: 1 addition & 1 deletion src/test/java/duke/tasks/ToDoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class ToDoTest {
@Test
public void testToString() {
ToDo toDo = new ToDo("read book");
String expected = "[T][] read book";
String expected = "[T][NOT DONE] read book";
assertEquals(expected, toDo.toString());
}
}
38 changes: 19 additions & 19 deletions text-ui-test/EXPECTED.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -7,67 +7,67 @@ There are no tasks in your list.
____________________________________________________________
____________________________________________________________
Got it. I've added this task:
[T][] read book
[T][NOT DONE] read book
Now you have 1 task in the list.
____________________________________________________________
____________________________________________________________
Nice! I've marked this task as done:
[T][] read book
[T][DONE] read book
____________________________________________________________
____________________________________________________________
Got it. I've added this task:
[D][] return book (by: Jun 06 2020)
[D][NOT DONE] return book (by: Jun 06 2020)
Now you have 2 tasks in the list.
____________________________________________________________
____________________________________________________________
Nice! I've marked this task as done:
[D][] return book (by: Jun 06 2020)
[D][DONE] return book (by: Jun 06 2020)
____________________________________________________________
____________________________________________________________
Got it. I've added this task:
[E][] project meeting (at: Aug 06 2020)
[E][NOT DONE] project meeting (at: Aug 06 2020)
Now you have 3 tasks in the list.
____________________________________________________________
____________________________________________________________
Got it. I've added this task:
[T][] join sports club
[T][NOT DONE] join sports club
Now you have 4 tasks in the list.
____________________________________________________________
____________________________________________________________
Nice! I've marked this task as done:
[T][] join sports club
[T][DONE] join sports club
____________________________________________________________
____________________________________________________________
Got it. I've added this task:
[T][] borrow book
[T][NOT DONE] borrow book
Now you have 5 tasks in the list.
____________________________________________________________
____________________________________________________________
Here are the tasks in your list:
1.[T][] read book
2.[D][] return book (by: Jun 06 2020)
3.[E][] project meeting (at: Aug 06 2020)
4.[T][] join sports club
5.[T][] borrow book
1.[T][DONE] read book
2.[D][DONE] return book (by: Jun 06 2020)
3.[E][NOT DONE] project meeting (at: Aug 06 2020)
4.[T][DONE] join sports club
5.[T][NOT DONE] borrow book
____________________________________________________________
____________________________________________________________
Noted. I've removed this task:
[E][] project meeting (at: Aug 06 2020)
[E][NOT DONE] project meeting (at: Aug 06 2020)
Now you have 4 tasks in the list.
____________________________________________________________
____________________________________________________________
The following deadlines/events are scheduled on Jun 06 2020.
1.[D][] return book (by: Jun 06 2020)
1.[D][DONE] return book (by: Jun 06 2020)
____________________________________________________________
____________________________________________________________
There are no deadlines/events scheduled on Jan 01 2020.
____________________________________________________________
____________________________________________________________
Here are the tasks in your list:
1.[T][] read book
2.[D][] return book (by: Jun 06 2020)
3.[T][] join sports club
4.[T][] borrow book
1.[T][DONE] read book
2.[D][DONE] return book (by: Jun 06 2020)
3.[T][DONE] join sports club
4.[T][NOT DONE] borrow book
____________________________________________________________
____________________________________________________________
Bye. Hope to see you again soon!
Expand Down

0 comments on commit 6ee9d23

Please sign in to comment.