package seedu.address.logic.commands;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static seedu.address.logic.commands.HelpCommand.SHOWING_HELP_MESSAGE;

import org.junit.Rule;
import org.junit.Test;

import seedu.address.commons.events.ui.ShowHelpRequestEvent;
import seedu.address.ui.testutil.EventsCollectorRule;

public class HelpCommandTest {
    @Rule
    public final EventsCollectorRule eventsCollectorRule = new EventsCollectorRule();

    @Test
    public void execute_help_success() {
        CommandResult result = new HelpCommand().execute();
        assertEquals(SHOWING_HELP_MESSAGE, result.feedbackToUser);
        assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof ShowHelpRequestEvent);
        assertTrue(eventsCollectorRule.eventsCollector.getSize() == 1);
    }
}

@@ -69,22 +69,20 @@
 t.assert
-Equals
+True
 ;%0Aimport
@@ -93,35 +93,73 @@
 tic 
-org.junit.Assert.assertTrue
+seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess
 ;%0Aim
@@ -342,16 +342,134 @@
 tEvent;%0A
+import seedu.address.logic.CommandHistory;%0Aimport seedu.address.model.Model;%0Aimport seedu.address.model.ModelManager;%0A
 import s
@@ -643,16 +643,117 @@
 ule();%0A%0A
+    private Model model = new ModelManager();%0A    private Model expectedModel = new ModelManager();%0A%0A
     @Tes
@@ -807,28 +807,31 @@
     
+Help
 Command
-Result result
+ helpCommand
  = n
@@ -850,18 +850,66 @@
 nd()
-.execute
+;%0A        helpCommand.setData(model, new CommandHistory
 ()
+)
 ;%0A  
@@ -924,15 +924,43 @@
 sert
-Equals(
+CommandSuccess(helpCommand, model, 
 SHOW
@@ -981,29 +981,21 @@
 GE, 
-result.feedbackToUser
+expectedModel
 );%0A 

verify model state as well