Skip to content

Commit

Permalink
Merge pull request #206 from e1121208/Fix-Sean-Kevin-Dias-Mistake
Browse files Browse the repository at this point in the history
Fix code mistakes
  • Loading branch information
e1121208 authored Nov 1, 2024
2 parents f7135c5 + 3e27534 commit b05663a
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/test/java/seedu/address/logic/LogicManagerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ public void execute_listCommandWhenNoClients_throwsCommandException() {

assertCommandException(listCommand, ListCommand.MESSAGE_NO_CLIENT_IN_LIST);
}
/*
@Test
public void execute_storageThrowsIoException_throwsCommandException() {
assertCommandFailureForExceptionFromStorage(DUMMY_IO_EXCEPTION, String.format(
Expand All @@ -149,7 +148,6 @@ public void execute_storageThrowsAdException_throwsCommandException() {
assertCommandFailureForExceptionFromStorage(DUMMY_AD_EXCEPTION, String.format(
LogicManager.FILE_OPS_PERMISSION_ERROR_FORMAT, DUMMY_AD_EXCEPTION.getMessage()));
}
*/
@Test
public void getFilteredPersonList_modifyList_throwsUnsupportedOperationException() {
assertThrows(UnsupportedOperationException.class, () -> logic.getFilteredPersonList().remove(0));
Expand Down Expand Up @@ -233,15 +231,12 @@ public void saveAddressBook(ReadOnlyAddressBook addressBook, Path filePath) thro

logic = new LogicManager(model, storage);

// Trigger the saveAddressBook method by executing an add command
// Trigger the saveAddressBook method by executing an add buyer command
String addBuyerCommand = AddBuyerProfile.COMMAND_WORD + " " + NAME_DESC_AMY + " "
+ PHONE_DESC_AMY + " " + EMAIL_DESC_AMY;

String addSellerCommand = AddSellerProfile.COMMAND_WORD + " " + NAME_DESC_AMY + " "
+ PHONE_DESC_AMY + " " + EMAIL_DESC_AMY;

// Use a loop or separate assertions if needed
assertCommandFailure(addBuyerCommand, CommandException.class, expectedMessage);
assertCommandFailure(addSellerCommand, CommandException.class, expectedMessage);
Buyer expectedBuyer = new PersonBuilder(AMY).withTags().buildBuyer();
ModelManager expectedModel = new ModelManager();
expectedModel.addPerson(expectedBuyer);
assertCommandFailure(addBuyerCommand, CommandException.class, expectedMessage, expectedModel);
}
}

0 comments on commit b05663a

Please sign in to comment.