Skip to content
This repository has been archived by the owner on Mar 2, 2019. It is now read-only.

Commit

Permalink
Fix command tests issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
cricketer94 committed Oct 16, 2016
1 parent 138fdd0 commit f136f17
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/test/java/seedu/todo/logic/commands/CompleteCommandTest.java
Expand Up @@ -4,12 +4,15 @@

import org.junit.Before;
import org.junit.Test;
import static org.hamcrest.Matchers.*;


import seedu.todo.model.task.ImmutableTask;
import seedu.todo.logic.commands.CompleteCommand;

public class CompleteCommandTest extends CommandTest {
private static final String VERB_COMPLETE = "marked complete";
private static final String VERB_INCOMPLETE = "marked incomplete";

@Override
protected BaseCommand commandUnderTest() {
Expand All @@ -29,9 +32,7 @@ public void testMarkComplete() throws Exception {
setParameter("3");
execute(true);
ImmutableTask markedComplete = getTaskAt(3);
assertEquals(result.getFeedback(),
command.taskSuccessfulResult(toMarkComplete.getTitle(),
"marked complete").getFeedback());
assertThat(result.getFeedback(), containsString(VERB_COMPLETE));
assertEquals(markedComplete, toMarkComplete);
assertTrue(toMarkComplete.isCompleted());

Expand All @@ -43,9 +44,7 @@ public void testMarkIncomplete() throws Exception {
setParameter("1");
execute(true);
ImmutableTask markedIncomplete = getTaskAt(1);
assertEquals(result.getFeedback(),
command.taskSuccessfulResult(toMarkIncomplete.getTitle(),
"marked incomplete").getFeedback());
assertThat(result.getFeedback(), containsString(VERB_INCOMPLETE));
assertEquals(markedIncomplete, toMarkIncomplete);
assertFalse(toMarkIncomplete.isCompleted());
}
Expand Down

0 comments on commit f136f17

Please sign in to comment.