forked from nus-cs2103-AY1920S1/addressbook-level3
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add new unimplemented email command * Fix line endings
- Loading branch information
1 parent
9fe0c7e
commit 8b0e9f5
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/main/java/seedu/address/logic/commands/EmailCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package seedu.address.logic.commands; | ||
|
||
import seedu.address.logic.commands.exceptions.CommandException; | ||
import seedu.address.model.Model; | ||
|
||
/** | ||
* Handles the sending of emails to interviewers/interviewees based on the email addresses associated with | ||
* the object. | ||
*/ | ||
public class EmailCommand extends Command { | ||
|
||
public static final String COMMAND_WORD = "email"; | ||
|
||
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Handles the sending of emails to " | ||
+ "interviewers/interviewees using their email addresses.\n\n" | ||
+ COMMAND_WORD + " timeslots\n" | ||
+ "Sends an email containing the interviewee's allocated interview time slot to every " | ||
+ "interviewee, including other details such as the interviewer, time, date and location."; | ||
|
||
public static final String MESSAGE_NOT_IMPLEMENTED_YET = "Email command not implemented yet"; | ||
|
||
@Override | ||
public CommandResult execute(Model model) throws CommandException { | ||
throw new CommandException(MESSAGE_NOT_IMPLEMENTED_YET); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/test/java/seedu/address/logic/commands/EmailCommandTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package seedu.address.logic.commands; | ||
|
||
import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure; | ||
import static seedu.address.logic.commands.EmailCommand.MESSAGE_NOT_IMPLEMENTED_YET; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import seedu.address.model.Model; | ||
import seedu.address.model.ModelManager; | ||
|
||
public class EmailCommandTest { | ||
private Model model = new ModelManager(); | ||
|
||
@Test | ||
public void execute_email_failure() { | ||
assertCommandFailure(new EmailCommand(), model, MESSAGE_NOT_IMPLEMENTED_YET); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters