Skip to content

Commit

Permalink
Modify exit command
Browse files Browse the repository at this point in the history
  • Loading branch information
Raghava-Chittidi committed Oct 14, 2024
1 parent 72b7502 commit 0cabe2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions src/main/java/seedu/address/logic/commands/ExitCommand.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
package seedu.address.logic.commands;

import seedu.address.model.Model;
import seedu.address.model.internshipapplication.InternshipApplication;

/**
* Terminates the program.
*/
public class ExitCommand extends Command {
public class ExitCommand extends Command<InternshipApplication> {

public static final String COMMAND_WORD = "exit";
public static final String COMMAND_WORD = "/exit";

public static final String MESSAGE_EXIT_ACKNOWLEDGEMENT = "Exiting Address Book as requested ...";
public static final String MESSAGE_EXIT_ACKNOWLEDGEMENT = "Exiting HireMe as requested ...";

@Override
public CommandResult execute(Model model) {
public CommandResult execute(Model<InternshipApplication> model) {
return new CommandResult(MESSAGE_EXIT_ACKNOWLEDGEMENT, false, true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@

import seedu.address.model.Model;
import seedu.address.model.ModelManager;
import seedu.address.model.internshipapplication.InternshipApplication;

public class ExitCommandTest {
private Model model = new ModelManager();
private Model expectedModel = new ModelManager();
private Model<InternshipApplication> model = new ModelManager<>();
private Model<InternshipApplication> expectedModel = new ModelManager<>();

@Test
public void execute_exit_success() {
CommandResult expectedCommandResult = new CommandResult(MESSAGE_EXIT_ACKNOWLEDGEMENT, false, true);
CommandResult expectedCommandResult =
new CommandResult(MESSAGE_EXIT_ACKNOWLEDGEMENT, false, true);
assertCommandSuccess(new ExitCommand(), model, expectedCommandResult, expectedModel);
}
}

0 comments on commit 0cabe2c

Please sign in to comment.