forked from nus-cs2103-AY1718S2/addressbook-level4
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
7,843 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,50 @@ | ||
# SunBangJie | ||
###### \java\seedu\ptman\logic\parser\PartTimeManagerParserTest.java | ||
``` java | ||
@Test | ||
public void parseCommand_editoutlet() throws Exception { | ||
String name = "EditedOutlet"; | ||
String operatingHours = "10:00-17:00"; | ||
String outletContact = "91234567"; | ||
String outletEmail = "[email protected]"; | ||
EditOutletCommand command = (EditOutletCommand) parser.parseCommand(EditOutletCommand.COMMAND_WORD | ||
+ " " + PREFIX_OUTLET_NAME + name | ||
+ " " + PREFIX_OPERATING_HOURS + operatingHours | ||
+ " " + PREFIX_OUTLET_CONTACT + outletContact | ||
+ " " + PREFIX_OUTLET_EMAIL + outletEmail); | ||
assertEquals(new EditOutletCommand(new OutletName(name), new OperatingHours(operatingHours), | ||
new OutletContact(outletContact), new OutletEmail(outletEmail)), command); | ||
} | ||
|
||
@Test | ||
public void parseCommand_editoutletAlias() throws Exception { | ||
String name = "EditedOutlet"; | ||
String operatingHours = "10:00-17:00"; | ||
String outletContact = "91234567"; | ||
String outletEmail = "[email protected]"; | ||
EditOutletCommand command = (EditOutletCommand) parser.parseCommand(EditOutletCommand.COMMAND_ALIAS | ||
+ " " + PREFIX_OUTLET_NAME + name | ||
+ " " + PREFIX_OPERATING_HOURS + operatingHours | ||
+ " " + PREFIX_OUTLET_CONTACT + outletContact | ||
+ " " + PREFIX_OUTLET_EMAIL + outletEmail); | ||
assertEquals(new EditOutletCommand(new OutletName(name), new OperatingHours(operatingHours), | ||
new OutletContact(outletContact), new OutletEmail(outletEmail)), command); | ||
} | ||
|
||
@Test | ||
public void parseCommand_announcement() throws Exception { | ||
String announcement = "new announcement."; | ||
AnnouncementCommand command = (AnnouncementCommand) parser.parseCommand(AnnouncementCommand.COMMAND_WORD | ||
+ " " + announcement); | ||
assertEquals(new AnnouncementCommand(new Announcement(announcement)), command); | ||
} | ||
|
||
@Test | ||
public void parseCommand_announcementAlias() throws Exception { | ||
String announcement = "new announcement."; | ||
AnnouncementCommand command = (AnnouncementCommand) parser.parseCommand(AnnouncementCommand.COMMAND_ALIAS | ||
+ " " + announcement); | ||
assertEquals(new AnnouncementCommand(new Announcement(announcement)), command); | ||
} | ||
|
||
``` |
Oops, something went wrong.