Skip to content

Commit

Permalink
Remove duplicated "clears"
Browse files Browse the repository at this point in the history
  • Loading branch information
louietyj committed Nov 5, 2016
1 parent 9500f12 commit 5505b73
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/test/java/seedu/todo/guitests/UndoRedoCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ public void resetDB() {

@Test
public void undo_single() {
console.runCommand("clear");
assertTaskVisibleAfterCmd(commandAdd1, task1);
assertTaskVisibleAfterCmd(commandAdd2, task2);
assertTaskNotVisibleAfterCmd("undo", task2);
}

@Test
public void undo_multiple() {
console.runCommand("clear");
assertTaskVisibleAfterCmd(commandAdd1, task1);
assertTaskVisibleAfterCmd(commandAdd2, task2);
assertTaskNotVisibleAfterCmd("undo 2", task1);
Expand All @@ -59,7 +57,6 @@ public void undo_multiple() {

@Test
public void undo_notavailable() {
console.runCommand("clear");
assertTaskVisibleAfterCmd(commandAdd1, task1);
assertTaskNotVisibleAfterCmd("undo", task1);
console.runCommand("undo");
Expand All @@ -69,22 +66,19 @@ public void undo_notavailable() {

@Test
public void undo_multiple_notavailable() {
console.runCommand("clear");
console.runCommand("undo 2");
assertEquals(console.getConsoleTextArea(), "We cannot undo 2 commands! At most, you can undo 1 command.");
}

@Test
public void redo_single() {
console.runCommand("clear");
assertTaskVisibleAfterCmd(commandAdd1, task1);
assertTaskNotVisibleAfterCmd("undo", task1);
assertTaskVisibleAfterCmd("redo", task1);
}

@Test
public void redo_multiple() {
console.runCommand("clear");
assertTaskVisibleAfterCmd(commandAdd1, task1);
assertTaskVisibleAfterCmd(commandAdd2, task2);
assertTaskNotVisibleAfterCmd("undo 2", task1);
Expand All @@ -95,14 +89,12 @@ public void redo_multiple() {

@Test
public void redo_notavailable() {
console.runCommand("clear");
console.runCommand("redo");
assertEquals(console.getConsoleTextArea(), "There is no command to redo!");
}

@Test
public void redo_multiple_notavailable() {
console.runCommand("clear");
console.runCommand("undo");
console.runCommand("redo 2");
assertEquals(console.getConsoleTextArea(), "We cannot redo 2 commands! At most, you can redo 1 command.");
Expand Down

0 comments on commit 5505b73

Please sign in to comment.