diff --git a/_reposense/config.json b/_reposense/config.json index b16127264be4..4a3f42b253fc 100644 --- a/_reposense/config.json +++ b/_reposense/config.json @@ -1,25 +1,33 @@ { - "authors": - [ + "authors": [ { "githubId": "ndhuu", "displayName": "NGU...HUU", - "authorNames": ["ndhuu"] + "authorNames": [ + "ndhuu" + ] }, { "githubId": "articstranger", "displayName": "WON...EMY", - "authorNames": ["articstranger"] + "authorNames": [ + "articstranger" + ] }, { "githubId": "swalahlah", "displayName": "LIO...HUI", - "authorNames": ["swalahlah"] + "authorNames": [ + "swalahlah" + ] }, { "githubId": "quinnzzzzz", "displayName": "ZHA... RU", - "authorNames": ["quinnzzzzz", "Quinn Zhao"] + "authorNames": [ + "quinnzzzzz", + "Quinn Zhao" + ] } ] } diff --git a/src/main/java/seedu/address/commons/core/GuiSettings.java b/src/main/java/seedu/address/commons/core/GuiSettings.java index dc4b73ae0ace..19a28472b834 100644 --- a/src/main/java/seedu/address/commons/core/GuiSettings.java +++ b/src/main/java/seedu/address/commons/core/GuiSettings.java @@ -1,6 +1,6 @@ package seedu.address.commons.core; -import java.awt.Point; +import java.awt.*; import java.io.Serializable; import java.util.Objects; diff --git a/src/main/java/seedu/address/logic/commands/project/AssignBeneficiaryCommand.java b/src/main/java/seedu/address/logic/commands/project/AssignBeneficiaryCommand.java index 441e688cb367..2fc532819e18 100644 --- a/src/main/java/seedu/address/logic/commands/project/AssignBeneficiaryCommand.java +++ b/src/main/java/seedu/address/logic/commands/project/AssignBeneficiaryCommand.java @@ -102,8 +102,9 @@ public boolean equals(Object other) { /** * update the previous assigned beneficiary in the following procedure: - * get the beneficiary - * add the project record in that beneficiary + * get the beneficiary + * add the project record in that beneficiary + * * @param model * @return beneficiary */ @@ -119,9 +120,10 @@ private Beneficiary updateBeneficiary(Model model) { /** * update the previous assigned beneficiary in the following procedure: - * get the previous beneficiary. - * delete the project record in that beneficiary. - * @param model + * get the previous beneficiary. + * delete the project record in that beneficiary. + * + * @param model */ private void updatePreBeneficiary(Model model) { if (isValidPreAssignedBeneficiary(model)) { @@ -139,6 +141,6 @@ private void updatePreBeneficiary(Model model) { private boolean isValidPreAssignedBeneficiary(Model model) { return projectToAssign.getBeneficiaryAssigned().toString() != "nil" && model.getFilteredBeneficiaryList().filtered( - x -> x.getName().equals(projectToAssign.getBeneficiaryAssigned())).size() != 0; + x -> x.getName().equals(projectToAssign.getBeneficiaryAssigned())).size() != 0; } } diff --git a/src/main/java/seedu/address/model/AddressBook.java b/src/main/java/seedu/address/model/AddressBook.java index b8ae007a887d..22c21a0e47d6 100644 --- a/src/main/java/seedu/address/model/AddressBook.java +++ b/src/main/java/seedu/address/model/AddressBook.java @@ -34,8 +34,7 @@ public class AddressBook implements ReadOnlyAddressBook { * * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication * among constructors. - */ - { + */ { volunteers = new UniqueVolunteerList(); projects = new UniqueProjectList(); beneficiaries = new UniqueBeneficiaryList(); diff --git a/src/main/java/seedu/address/ui/MainWindow.java b/src/main/java/seedu/address/ui/MainWindow.java index 1ce5db8adbde..b3c915f8f7ff 100644 --- a/src/main/java/seedu/address/ui/MainWindow.java +++ b/src/main/java/seedu/address/ui/MainWindow.java @@ -172,6 +172,7 @@ public void handleHelp() { } //@@author ndhuu + /** * open summary table window. */ diff --git a/src/test/java/guitests/GuiRobot.java b/src/test/java/guitests/GuiRobot.java index 4bdccdf1f90d..42bd96ebb27e 100644 --- a/src/test/java/guitests/GuiRobot.java +++ b/src/test/java/guitests/GuiRobot.java @@ -4,8 +4,9 @@ import java.util.function.BooleanSupplier; import org.testfx.api.FxRobot; -import javafx.stage.Stage; + import guitests.guihandles.exceptions.StageNotFoundException; +import javafx.stage.Stage; /** * Robot used to simulate user actions on the GUI. diff --git a/src/test/java/seedu/address/AppParametersTest.java b/src/test/java/seedu/address/AppParametersTest.java index a867b26116a0..e6ef73d83b50 100644 --- a/src/test/java/seedu/address/AppParametersTest.java +++ b/src/test/java/seedu/address/AppParametersTest.java @@ -8,10 +8,10 @@ import java.util.List; import java.util.Map; -import javafx.application.Application; - import org.junit.Test; +import javafx.application.Application; + public class AppParametersTest { private final ParametersStub parametersStub = new ParametersStub(); diff --git a/src/test/java/seedu/address/commons/util/InvalidationListenerManagerTest.java b/src/test/java/seedu/address/commons/util/InvalidationListenerManagerTest.java index e1dfd384a88c..b9ad921d7415 100644 --- a/src/test/java/seedu/address/commons/util/InvalidationListenerManagerTest.java +++ b/src/test/java/seedu/address/commons/util/InvalidationListenerManagerTest.java @@ -3,6 +3,7 @@ import static org.junit.Assert.assertEquals; import org.junit.Test; + import javafx.beans.InvalidationListener; import javafx.beans.property.SimpleObjectProperty; diff --git a/src/test/java/seedu/address/logic/commands/MapCommandTest.java b/src/test/java/seedu/address/logic/commands/MapCommandTest.java index e2803f8f0631..7353376195b4 100644 --- a/src/test/java/seedu/address/logic/commands/MapCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/MapCommandTest.java @@ -7,8 +7,9 @@ import java.util.ArrayList; -import javafx.util.Pair; import org.junit.Test; + +import javafx.util.Pair; import seedu.address.logic.CommandHistory; import seedu.address.model.MapObject; import seedu.address.model.Model; diff --git a/src/test/java/seedu/address/logic/commands/RedoCommandTest.java b/src/test/java/seedu/address/logic/commands/RedoCommandTest.java index acd48c74b7f2..1a8306dcc7ae 100644 --- a/src/test/java/seedu/address/logic/commands/RedoCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/RedoCommandTest.java @@ -7,6 +7,7 @@ import org.junit.Before; import org.junit.Test; + import seedu.address.logic.CommandHistory; import seedu.address.model.Model; import seedu.address.model.ModelManager; diff --git a/src/test/java/seedu/address/logic/commands/UndoCommandTest.java b/src/test/java/seedu/address/logic/commands/UndoCommandTest.java index f94422ab0b7e..d9262a462d60 100644 --- a/src/test/java/seedu/address/logic/commands/UndoCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/UndoCommandTest.java @@ -7,6 +7,7 @@ import org.junit.Before; import org.junit.Test; + import seedu.address.logic.CommandHistory; import seedu.address.model.Model; import seedu.address.model.ModelManager; diff --git a/src/test/java/seedu/address/logic/commands/beneficiary/AddBeneficiaryCommandTest.java b/src/test/java/seedu/address/logic/commands/beneficiary/AddBeneficiaryCommandTest.java index 5bdb129e3795..74df2d0dc689 100644 --- a/src/test/java/seedu/address/logic/commands/beneficiary/AddBeneficiaryCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/beneficiary/AddBeneficiaryCommandTest.java @@ -16,6 +16,8 @@ import org.junit.Test; import org.junit.rules.ExpectedException; +import javafx.beans.property.ReadOnlyProperty; +import javafx.collections.ObservableList; import seedu.address.commons.core.GuiSettings; import seedu.address.logic.CommandHistory; import seedu.address.logic.commands.CommandResult; @@ -31,16 +33,13 @@ import seedu.address.model.project.exceptions.ProjectNotFoundException; import seedu.address.model.volunteer.Volunteer; import seedu.address.testutil.beneficiary.BeneficiaryBuilder; -import javafx.beans.property.ReadOnlyProperty; -import javafx.collections.ObservableList; public class AddBeneficiaryCommandTest { - - private static final CommandHistory EMPTY_COMMAND_HISTORY = new CommandHistory(); - @Rule public ExpectedException thrown = ExpectedException.none(); + private static final CommandHistory EMPTY_COMMAND_HISTORY = new CommandHistory(); + private CommandHistory commandHistory = new CommandHistory(); @Test diff --git a/src/test/java/seedu/address/logic/commands/beneficiary/BeneficiaryCommandTestUtil.java b/src/test/java/seedu/address/logic/commands/beneficiary/BeneficiaryCommandTestUtil.java index bdd15aaf4c10..07694d1159f0 100644 --- a/src/test/java/seedu/address/logic/commands/beneficiary/BeneficiaryCommandTestUtil.java +++ b/src/test/java/seedu/address/logic/commands/beneficiary/BeneficiaryCommandTestUtil.java @@ -3,7 +3,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; - import static seedu.address.logic.parser.CliSyntaxBeneficiary.PREFIX_ADDRESS; import static seedu.address.logic.parser.CliSyntaxBeneficiary.PREFIX_EMAIL; import static seedu.address.logic.parser.CliSyntaxBeneficiary.PREFIX_NAME; diff --git a/src/test/java/seedu/address/logic/commands/beneficiary/DeleteBeneficiaryCommandTest.java b/src/test/java/seedu/address/logic/commands/beneficiary/DeleteBeneficiaryCommandTest.java index ab42bc4a8f30..12b237e98d35 100644 --- a/src/test/java/seedu/address/logic/commands/beneficiary/DeleteBeneficiaryCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/beneficiary/DeleteBeneficiaryCommandTest.java @@ -4,9 +4,6 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertTrue; - -import org.junit.Test; - import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure; import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; import static seedu.address.logic.commands.beneficiary.BeneficiaryCommandTestUtil.showBeneficiaryAtIndex; @@ -19,6 +16,9 @@ import static seedu.address.testutil.beneficiary.BeneficiariesSyncProjects.getAddressBookForBeneficiarySyncTest; import static seedu.address.testutil.beneficiary.BeneficiariesSyncProjects.getProjectA2B; import static seedu.address.testutil.beneficiary.TypicalBeneficiaries.getTypicalAddressBook; + +import org.junit.Test; + import seedu.address.commons.core.Messages; import seedu.address.commons.core.index.Index; import seedu.address.logic.CommandHistory; diff --git a/src/test/java/seedu/address/logic/commands/beneficiary/EditBeneficiaryCommandTest.java b/src/test/java/seedu/address/logic/commands/beneficiary/EditBeneficiaryCommandTest.java index bb8f85ca47f6..90669cedba8d 100644 --- a/src/test/java/seedu/address/logic/commands/beneficiary/EditBeneficiaryCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/beneficiary/EditBeneficiaryCommandTest.java @@ -4,9 +4,6 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertTrue; - -import org.junit.Test; - import static seedu.address.logic.commands.beneficiary.BeneficiaryCommandTestUtil.DESC_ANIMAL_SHELTER; import static seedu.address.logic.commands.beneficiary.BeneficiaryCommandTestUtil.DESC_BABES; import static seedu.address.logic.commands.beneficiary.BeneficiaryCommandTestUtil.VALID_NAME_BABES; @@ -26,6 +23,9 @@ import static seedu.address.testutil.beneficiary.BeneficiariesSyncProjects.getAddressBookForBeneficiarySyncTest; import static seedu.address.testutil.beneficiary.BeneficiariesSyncProjects.getProjectA2B; import static seedu.address.testutil.beneficiary.TypicalBeneficiaries.getTypicalAddressBook; + +import org.junit.Test; + import seedu.address.commons.core.Messages; import seedu.address.commons.core.index.Index; import seedu.address.logic.CommandHistory; diff --git a/src/test/java/seedu/address/logic/commands/beneficiary/EditBeneficiaryDescriptorTest.java b/src/test/java/seedu/address/logic/commands/beneficiary/EditBeneficiaryDescriptorTest.java index f83e33845ca6..73291b4824c3 100644 --- a/src/test/java/seedu/address/logic/commands/beneficiary/EditBeneficiaryDescriptorTest.java +++ b/src/test/java/seedu/address/logic/commands/beneficiary/EditBeneficiaryDescriptorTest.java @@ -3,9 +3,6 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; - -import org.junit.Test; - import static seedu.address.logic.commands.beneficiary.BeneficiaryCommandTestUtil.DESC_ANIMAL_SHELTER; import static seedu.address.logic.commands.beneficiary.BeneficiaryCommandTestUtil.DESC_BABES; import static seedu.address.logic.commands.beneficiary.BeneficiaryCommandTestUtil.VALID_ADDRESS_BABES; @@ -13,6 +10,9 @@ import static seedu.address.logic.commands.beneficiary.BeneficiaryCommandTestUtil.VALID_NAME_BABES; import static seedu.address.logic.commands.beneficiary.BeneficiaryCommandTestUtil.VALID_PHONE_BABES; import static seedu.address.logic.commands.beneficiary.EditBeneficiaryCommand.EditBeneficiaryDescriptor; + +import org.junit.Test; + import seedu.address.testutil.beneficiary.EditBeneficiaryDescriptorBuilder; public class EditBeneficiaryDescriptorTest { diff --git a/src/test/java/seedu/address/logic/commands/project/AddProjectCommandTest.java b/src/test/java/seedu/address/logic/commands/project/AddProjectCommandTest.java index 6c8ba4b478a0..01a2be20c0db 100644 --- a/src/test/java/seedu/address/logic/commands/project/AddProjectCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/project/AddProjectCommandTest.java @@ -14,6 +14,9 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + +import javafx.beans.property.ReadOnlyProperty; +import javafx.collections.ObservableList; import seedu.address.commons.core.GuiSettings; import seedu.address.logic.CommandHistory; import seedu.address.logic.commands.CommandResult; @@ -26,8 +29,6 @@ import seedu.address.model.beneficiary.Beneficiary; import seedu.address.model.project.Project; import seedu.address.model.volunteer.Volunteer; -import javafx.beans.property.ReadOnlyProperty; -import javafx.collections.ObservableList; public class AddProjectCommandTest { diff --git a/src/test/java/seedu/address/logic/commands/project/AssignBeneficiaryCommandTest.java b/src/test/java/seedu/address/logic/commands/project/AssignBeneficiaryCommandTest.java index a5318e066206..01e1a96defeb 100644 --- a/src/test/java/seedu/address/logic/commands/project/AssignBeneficiaryCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/project/AssignBeneficiaryCommandTest.java @@ -2,10 +2,20 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure; +import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.address.logic.commands.project.ProjectCommandTestUtil.showBeneficiaryAtIndex; +import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST; +import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND; +import static seedu.address.testutil.project.TypicalProjects.PROJECT1; +import static seedu.address.testutil.project.TypicalProjects.PROJECT2; +import static seedu.address.testutil.project.TypicalProjects.PROJECT3; +import static seedu.address.testutil.project.TypicalProjects.getTypicalAddressBook; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import seedu.address.commons.core.Messages; import seedu.address.commons.core.index.Index; import seedu.address.logic.CommandHistory; @@ -13,15 +23,6 @@ import seedu.address.model.ModelManager; import seedu.address.model.UserPrefs; import seedu.address.model.project.Project; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; -import static seedu.address.logic.commands.project.ProjectCommandTestUtil.showBeneficiaryAtIndex; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST; -import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND; -import static seedu.address.testutil.project.TypicalProjects.PROJECT1; -import static seedu.address.testutil.project.TypicalProjects.PROJECT2; -import static seedu.address.testutil.project.TypicalProjects.PROJECT3; -import static seedu.address.testutil.project.TypicalProjects.getTypicalAddressBook; public class AssignBeneficiaryCommandTest { diff --git a/src/test/java/seedu/address/logic/commands/project/AssignVolunteerCommandTest.java b/src/test/java/seedu/address/logic/commands/project/AssignVolunteerCommandTest.java index 7d058287f775..d4187b31506a 100644 --- a/src/test/java/seedu/address/logic/commands/project/AssignVolunteerCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/project/AssignVolunteerCommandTest.java @@ -2,23 +2,23 @@ import static junit.framework.TestCase.assertTrue; import static org.junit.Assert.assertFalse; +import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure; +import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.address.testutil.project.TypicalProjects.PROJECT1; +import static seedu.address.testutil.project.TypicalProjects.PROJECT2; +import static seedu.address.testutil.project.TypicalProjects.PROJECT3; +import static seedu.address.testutil.project.TypicalProjects.getTypicalAddressBook; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import seedu.address.commons.core.Messages; import seedu.address.logic.CommandHistory; import seedu.address.model.Model; import seedu.address.model.ModelManager; import seedu.address.model.UserPrefs; import seedu.address.model.project.Project; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; -import static seedu.address.testutil.project.TypicalProjects.PROJECT1; -import static seedu.address.testutil.project.TypicalProjects.PROJECT2; -import static seedu.address.testutil.project.TypicalProjects.PROJECT3; -import static seedu.address.testutil.project.TypicalProjects.getTypicalAddressBook; - public class AssignVolunteerCommandTest { diff --git a/src/test/java/seedu/address/logic/commands/project/CompleteCommandTest.java b/src/test/java/seedu/address/logic/commands/project/CompleteCommandTest.java index 42550a730f65..56c5c24c1715 100644 --- a/src/test/java/seedu/address/logic/commands/project/CompleteCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/project/CompleteCommandTest.java @@ -2,10 +2,16 @@ import static junit.framework.TestCase.assertTrue; import static org.junit.Assert.assertFalse; +import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure; +import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST; +import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND; +import static seedu.address.testutil.project.TypicalProjects.getTypicalAddressBook; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import seedu.address.commons.core.Messages; import seedu.address.commons.core.index.Index; import seedu.address.logic.CommandHistory; @@ -13,11 +19,6 @@ import seedu.address.model.ModelManager; import seedu.address.model.UserPrefs; import seedu.address.model.project.ProjectTitle; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST; -import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND; -import static seedu.address.testutil.project.TypicalProjects.getTypicalAddressBook; public class CompleteCommandTest { diff --git a/src/test/java/seedu/address/logic/commands/project/DeleteProjectCommandTest.java b/src/test/java/seedu/address/logic/commands/project/DeleteProjectCommandTest.java index 58b7c9b4e465..50d3116fa65a 100644 --- a/src/test/java/seedu/address/logic/commands/project/DeleteProjectCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/project/DeleteProjectCommandTest.java @@ -3,8 +3,15 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertTrue; +import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure; +import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.address.logic.commands.project.ProjectCommandTestUtil.showProjectAtIndex; +import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST; +import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND; +import static seedu.address.testutil.project.TypicalProjects.getTypicalAddressBook; import org.junit.Test; + import seedu.address.commons.core.Messages; import seedu.address.commons.core.index.Index; import seedu.address.logic.CommandHistory; @@ -15,12 +22,6 @@ import seedu.address.model.ModelManager; import seedu.address.model.UserPrefs; import seedu.address.model.project.Project; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; -import static seedu.address.logic.commands.project.ProjectCommandTestUtil.showProjectAtIndex; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST; -import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND; -import static seedu.address.testutil.project.TypicalProjects.getTypicalAddressBook; /** * Contains integration tests (interaction with the Model, UndoCommand and RedoCommand) and unit tests for diff --git a/src/test/java/seedu/address/logic/commands/project/ListProjectCommandTest.java b/src/test/java/seedu/address/logic/commands/project/ListProjectCommandTest.java index bee22e7998ce..e912ddaab104 100644 --- a/src/test/java/seedu/address/logic/commands/project/ListProjectCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/project/ListProjectCommandTest.java @@ -1,16 +1,18 @@ package seedu.address.logic.commands.project; +import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.address.logic.commands.project.ProjectCommandTestUtil.showProjectAtIndex; +import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST; +import static seedu.address.testutil.project.TypicalProjects.getTypicalAddressBook; + import org.junit.Before; import org.junit.Test; + import seedu.address.logic.CommandHistory; import seedu.address.logic.commands.CommandTestUtil; import seedu.address.model.Model; import seedu.address.model.ModelManager; import seedu.address.model.UserPrefs; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; -import static seedu.address.logic.commands.project.ProjectCommandTestUtil.showProjectAtIndex; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST; -import static seedu.address.testutil.project.TypicalProjects.getTypicalAddressBook; /** * Contains integration tests (interaction with the Model) and unit tests for ListCommand. diff --git a/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java b/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java index 16067c5e156d..2e7d49769662 100644 --- a/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java +++ b/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java @@ -8,6 +8,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import seedu.address.logic.commands.HelpCommand; import seedu.address.logic.commands.HistoryCommand; import seedu.address.logic.commands.RedoCommand; @@ -15,10 +16,11 @@ import seedu.address.logic.parser.exceptions.ParseException; public class AddressBookParserTest { - private final AddressBookParser parser = new AddressBookParser(); @Rule public ExpectedException thrown = ExpectedException.none(); + private final AddressBookParser parser = new AddressBookParser(); + @Test public void parseCommand_help() throws Exception { assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD) instanceof HelpCommand); diff --git a/src/test/java/seedu/address/logic/parser/FindVolunteerCommandParserTest.java b/src/test/java/seedu/address/logic/parser/FindVolunteerCommandParserTest.java index efb71cea4ae8..a3bf581bc359 100644 --- a/src/test/java/seedu/address/logic/parser/FindVolunteerCommandParserTest.java +++ b/src/test/java/seedu/address/logic/parser/FindVolunteerCommandParserTest.java @@ -7,6 +7,7 @@ import java.util.Arrays; import org.junit.Test; + import seedu.address.logic.commands.FindVolunteerCommand; import seedu.address.model.volunteer.NameContainsKeywordsPredicate; diff --git a/src/test/java/seedu/address/logic/parser/MapCommandParserTest.java b/src/test/java/seedu/address/logic/parser/MapCommandParserTest.java index c0bf35a9f451..27a8eb900406 100644 --- a/src/test/java/seedu/address/logic/parser/MapCommandParserTest.java +++ b/src/test/java/seedu/address/logic/parser/MapCommandParserTest.java @@ -5,6 +5,7 @@ import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure; import org.junit.Test; + import seedu.address.logic.commands.MapCommand; public class MapCommandParserTest { diff --git a/src/test/java/seedu/address/logic/parser/ParserUtilTest.java b/src/test/java/seedu/address/logic/parser/ParserUtilTest.java index 3af76a875fc1..5143f04cbe0d 100644 --- a/src/test/java/seedu/address/logic/parser/ParserUtilTest.java +++ b/src/test/java/seedu/address/logic/parser/ParserUtilTest.java @@ -5,6 +5,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import seedu.address.logic.parser.exceptions.ParseException; public class ParserUtilTest { diff --git a/src/test/java/seedu/address/logic/parser/beneficiary/AddBeneficiaryCommandParserTest.java b/src/test/java/seedu/address/logic/parser/beneficiary/AddBeneficiaryCommandParserTest.java index 04e1df6a9929..3520f986cbb1 100644 --- a/src/test/java/seedu/address/logic/parser/beneficiary/AddBeneficiaryCommandParserTest.java +++ b/src/test/java/seedu/address/logic/parser/beneficiary/AddBeneficiaryCommandParserTest.java @@ -26,6 +26,7 @@ import static seedu.address.testutil.beneficiary.TypicalBeneficiaries.BABES; import org.junit.Test; + import seedu.address.logic.commands.beneficiary.AddBeneficiaryCommand; import seedu.address.model.beneficiary.Address; import seedu.address.model.beneficiary.Beneficiary; diff --git a/src/test/java/seedu/address/logic/parser/beneficiary/DeleteBeneficiaryCommandParserTest.java b/src/test/java/seedu/address/logic/parser/beneficiary/DeleteBeneficiaryCommandParserTest.java index 817fc149283c..65271e6e7878 100644 --- a/src/test/java/seedu/address/logic/parser/beneficiary/DeleteBeneficiaryCommandParserTest.java +++ b/src/test/java/seedu/address/logic/parser/beneficiary/DeleteBeneficiaryCommandParserTest.java @@ -7,6 +7,7 @@ import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST; import org.junit.Test; + import seedu.address.logic.commands.beneficiary.DeleteBeneficiaryCommand; /** diff --git a/src/test/java/seedu/address/logic/parser/beneficiary/EditBeneficiaryCommandParserTest.java b/src/test/java/seedu/address/logic/parser/beneficiary/EditBeneficiaryCommandParserTest.java index 2c9ab3908f5e..865e64e9f350 100644 --- a/src/test/java/seedu/address/logic/parser/beneficiary/EditBeneficiaryCommandParserTest.java +++ b/src/test/java/seedu/address/logic/parser/beneficiary/EditBeneficiaryCommandParserTest.java @@ -27,6 +27,7 @@ import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD; import org.junit.Test; + import seedu.address.commons.core.index.Index; import seedu.address.logic.commands.beneficiary.EditBeneficiaryCommand; import seedu.address.logic.commands.beneficiary.EditBeneficiaryCommand.EditBeneficiaryDescriptor; diff --git a/src/test/java/seedu/address/logic/parser/beneficiary/FindBeneficiaryCommandParserTest.java b/src/test/java/seedu/address/logic/parser/beneficiary/FindBeneficiaryCommandParserTest.java index 022c89641c0f..062a32a4d95c 100644 --- a/src/test/java/seedu/address/logic/parser/beneficiary/FindBeneficiaryCommandParserTest.java +++ b/src/test/java/seedu/address/logic/parser/beneficiary/FindBeneficiaryCommandParserTest.java @@ -8,6 +8,7 @@ import java.util.Arrays; import org.junit.Test; + import seedu.address.logic.commands.beneficiary.FindBeneficiaryCommand; import seedu.address.model.beneficiary.NameContainsKeywordsPredicate; diff --git a/src/test/java/seedu/address/model/AddressBookTest.java b/src/test/java/seedu/address/model/AddressBookTest.java index f15041c2b67f..519652a4cd27 100644 --- a/src/test/java/seedu/address/model/AddressBookTest.java +++ b/src/test/java/seedu/address/model/AddressBookTest.java @@ -4,21 +4,23 @@ import java.util.Collections; -import javafx.beans.InvalidationListener; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + +import javafx.beans.InvalidationListener; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; import seedu.address.model.beneficiary.Beneficiary; import seedu.address.model.project.Project; import seedu.address.model.volunteer.Volunteer; public class AddressBookTest { - private final AddressBook addressBook = new AddressBook(); @Rule public ExpectedException thrown = ExpectedException.none(); + private final AddressBook addressBook = new AddressBook(); + @Test public void constructor() { assertEquals(Collections.emptyList(), addressBook.getVolunteerList()); diff --git a/src/test/java/seedu/address/model/ModelManagerTest.java b/src/test/java/seedu/address/model/ModelManagerTest.java index eaa65b890ee1..869d7fc569af 100644 --- a/src/test/java/seedu/address/model/ModelManagerTest.java +++ b/src/test/java/seedu/address/model/ModelManagerTest.java @@ -10,6 +10,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import seedu.address.commons.core.GuiSettings; import seedu.address.testutil.AddressBookBuilder; diff --git a/src/test/java/seedu/address/model/UserPrefsTest.java b/src/test/java/seedu/address/model/UserPrefsTest.java index c5935a925d75..20da6c4050d9 100644 --- a/src/test/java/seedu/address/model/UserPrefsTest.java +++ b/src/test/java/seedu/address/model/UserPrefsTest.java @@ -1,6 +1,7 @@ package seedu.address.model; import org.junit.Test; + import seedu.address.testutil.Assert; public class UserPrefsTest { diff --git a/src/test/java/seedu/address/model/VersionedAddressBookTest.java b/src/test/java/seedu/address/model/VersionedAddressBookTest.java index d9d8faee36d2..5e608f1854da 100644 --- a/src/test/java/seedu/address/model/VersionedAddressBookTest.java +++ b/src/test/java/seedu/address/model/VersionedAddressBookTest.java @@ -5,11 +5,11 @@ import static org.junit.Assert.assertTrue; import static org.junit.jupiter.api.Assertions.assertThrows; -import java.util.Arrays; import java.util.Collections; import java.util.List; import org.junit.Test; + import seedu.address.testutil.AddressBookBuilder; public class VersionedAddressBookTest { diff --git a/src/test/java/seedu/address/model/beneficiary/EmailTest.java b/src/test/java/seedu/address/model/beneficiary/EmailTest.java index b19784b20593..75905940254a 100644 --- a/src/test/java/seedu/address/model/beneficiary/EmailTest.java +++ b/src/test/java/seedu/address/model/beneficiary/EmailTest.java @@ -5,7 +5,6 @@ import org.junit.Test; -import seedu.address.model.person.Email; import seedu.address.testutil.Assert; public class EmailTest { diff --git a/src/test/java/seedu/address/model/beneficiary/NameContainsKeywordsPredicateTest.java b/src/test/java/seedu/address/model/beneficiary/NameContainsKeywordsPredicateTest.java index d2d521fdd4f7..a98a45352dac 100644 --- a/src/test/java/seedu/address/model/beneficiary/NameContainsKeywordsPredicateTest.java +++ b/src/test/java/seedu/address/model/beneficiary/NameContainsKeywordsPredicateTest.java @@ -9,8 +9,7 @@ import org.junit.Test; -import seedu.address.model.person.NameContainsKeywordsPredicate; -import seedu.address.testutil.PersonBuilder; +import seedu.address.testutil.beneficiary.BeneficiaryBuilder; public class NameContainsKeywordsPredicateTest { @@ -35,7 +34,7 @@ public void equals() { // null -> returns false assertFalse(firstPredicate.equals(null)); - // different person -> returns false + // different Beneficiary -> returns false assertFalse(firstPredicate.equals(secondPredicate)); } @@ -43,34 +42,34 @@ public void equals() { public void test_nameContainsKeywords_returnsTrue() { // One keyword NameContainsKeywordsPredicate predicate = new NameContainsKeywordsPredicate(Collections.singletonList("Alice")); - assertTrue(predicate.test(new PersonBuilder().withName("Alice Bob").build())); + assertTrue(predicate.test(new BeneficiaryBuilder().withName("Alice Bob").build())); // Multiple keywords predicate = new NameContainsKeywordsPredicate(Arrays.asList("Alice", "Bob")); - assertTrue(predicate.test(new PersonBuilder().withName("Alice Bob").build())); + assertTrue(predicate.test(new BeneficiaryBuilder().withName("Alice Bob").build())); // Only one matching keyword predicate = new NameContainsKeywordsPredicate(Arrays.asList("Bob", "Carol")); - assertTrue(predicate.test(new PersonBuilder().withName("Alice Carol").build())); + assertTrue(predicate.test(new BeneficiaryBuilder().withName("Alice Carol").build())); // Mixed-case keywords predicate = new NameContainsKeywordsPredicate(Arrays.asList("aLIce", "bOB")); - assertTrue(predicate.test(new PersonBuilder().withName("Alice Bob").build())); + assertTrue(predicate.test(new BeneficiaryBuilder().withName("Alice Bob").build())); } @Test public void test_nameDoesNotContainKeywords_returnsFalse() { // Zero keywords NameContainsKeywordsPredicate predicate = new NameContainsKeywordsPredicate(Collections.emptyList()); - assertFalse(predicate.test(new PersonBuilder().withName("Alice").build())); + assertFalse(predicate.test(new BeneficiaryBuilder().withName("Alice").build())); // Non-matching keyword predicate = new NameContainsKeywordsPredicate(Arrays.asList("Carol")); - assertFalse(predicate.test(new PersonBuilder().withName("Alice Bob").build())); + assertFalse(predicate.test(new BeneficiaryBuilder().withName("Alice Bob").build())); // Keywords match phone, email and address, but does not match name predicate = new NameContainsKeywordsPredicate(Arrays.asList("12345", "alice@email.com", "Main", "Street")); - assertFalse(predicate.test(new PersonBuilder().withName("Alice").withPhone("12345") + assertFalse(predicate.test(new BeneficiaryBuilder().withName("Alice").withPhone("12345") .withEmail("alice@email.com").withAddress("Main Street").build())); } } diff --git a/src/test/java/seedu/address/model/beneficiary/NameTest.java b/src/test/java/seedu/address/model/beneficiary/NameTest.java index 781812bac311..225be8121613 100644 --- a/src/test/java/seedu/address/model/beneficiary/NameTest.java +++ b/src/test/java/seedu/address/model/beneficiary/NameTest.java @@ -5,7 +5,6 @@ import org.junit.Test; -import seedu.address.model.person.Name; import seedu.address.testutil.Assert; public class NameTest { diff --git a/src/test/java/seedu/address/model/beneficiary/PhoneTest.java b/src/test/java/seedu/address/model/beneficiary/PhoneTest.java index ca1478697e00..7aa9e15873ee 100644 --- a/src/test/java/seedu/address/model/beneficiary/PhoneTest.java +++ b/src/test/java/seedu/address/model/beneficiary/PhoneTest.java @@ -5,7 +5,6 @@ import org.junit.Test; -import seedu.address.model.person.Phone; import seedu.address.testutil.Assert; public class PhoneTest { diff --git a/src/test/java/seedu/address/model/project/CompleteTest.java b/src/test/java/seedu/address/model/project/CompleteTest.java index 223bc885a8b5..66bcbdd46742 100644 --- a/src/test/java/seedu/address/model/project/CompleteTest.java +++ b/src/test/java/seedu/address/model/project/CompleteTest.java @@ -4,6 +4,7 @@ import static org.junit.Assert.assertTrue; import org.junit.Test; + import seedu.address.testutil.Assert; public class CompleteTest { diff --git a/src/test/java/seedu/address/model/project/ProjectDateTest.java b/src/test/java/seedu/address/model/project/ProjectDateTest.java index 18fba3411551..a9f74c71c603 100644 --- a/src/test/java/seedu/address/model/project/ProjectDateTest.java +++ b/src/test/java/seedu/address/model/project/ProjectDateTest.java @@ -4,6 +4,7 @@ import static org.junit.Assert.assertTrue; import org.junit.Test; + import seedu.address.testutil.Assert; public class ProjectDateTest { diff --git a/src/test/java/seedu/address/model/project/ProjectTitleTest.java b/src/test/java/seedu/address/model/project/ProjectTitleTest.java index ab4c23960b78..c3a674a82f48 100644 --- a/src/test/java/seedu/address/model/project/ProjectTitleTest.java +++ b/src/test/java/seedu/address/model/project/ProjectTitleTest.java @@ -4,6 +4,7 @@ import static org.junit.Assert.assertTrue; import org.junit.Test; + import seedu.address.testutil.Assert; public class ProjectTitleTest { diff --git a/src/test/java/seedu/address/model/project/UniqueProjectListTest.java b/src/test/java/seedu/address/model/project/UniqueProjectListTest.java index 87350fce5532..ae75ee5a8ee4 100644 --- a/src/test/java/seedu/address/model/project/UniqueProjectListTest.java +++ b/src/test/java/seedu/address/model/project/UniqueProjectListTest.java @@ -13,14 +13,16 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import seedu.address.model.project.exceptions.DuplicateProjectException; import seedu.address.model.project.exceptions.ProjectNotFoundException; public class UniqueProjectListTest { - private final UniqueProjectList uniqueProjectList = new UniqueProjectList(); @Rule public ExpectedException thrown = ExpectedException.none(); + private final UniqueProjectList uniqueProjectList = new UniqueProjectList(); + @Test public void contains_nullProject_throwsNullPointerException() { thrown.expect(NullPointerException.class); diff --git a/src/test/java/seedu/address/model/tag/TagTest.java b/src/test/java/seedu/address/model/tag/TagTest.java index 85587daa4e42..80bfd156d816 100644 --- a/src/test/java/seedu/address/model/tag/TagTest.java +++ b/src/test/java/seedu/address/model/tag/TagTest.java @@ -1,6 +1,7 @@ package seedu.address.model.tag; import org.junit.Test; + import seedu.address.testutil.Assert; public class TagTest { diff --git a/src/test/java/seedu/address/storage/JsonAddressBookStorageTest.java b/src/test/java/seedu/address/storage/JsonAddressBookStorageTest.java index b8a6360e31c4..a3b5b2367c0d 100644 --- a/src/test/java/seedu/address/storage/JsonAddressBookStorageTest.java +++ b/src/test/java/seedu/address/storage/JsonAddressBookStorageTest.java @@ -10,16 +10,17 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; + import seedu.address.commons.exceptions.DataConversionException; import seedu.address.model.AddressBook; import seedu.address.model.ReadOnlyAddressBook; public class JsonAddressBookStorageTest { - private static final Path TEST_DATA_FOLDER = Paths.get("src", "test", "data", "JsonAddressBookStorageTest"); - @Rule public ExpectedException thrown = ExpectedException.none(); + private static final Path TEST_DATA_FOLDER = Paths.get("src", "test", "data", "JsonAddressBookStorageTest"); + @Rule public TemporaryFolder testFolder = new TemporaryFolder(); diff --git a/src/test/java/seedu/address/storage/JsonSerializableAddressBookTest.java b/src/test/java/seedu/address/storage/JsonSerializableAddressBookTest.java index 029919c4d276..07b3646eb867 100644 --- a/src/test/java/seedu/address/storage/JsonSerializableAddressBookTest.java +++ b/src/test/java/seedu/address/storage/JsonSerializableAddressBookTest.java @@ -7,15 +7,14 @@ import org.junit.rules.ExpectedException; public class JsonSerializableAddressBookTest { + @Rule + public ExpectedException thrown = ExpectedException.none(); private static final Path TEST_DATA_FOLDER = Paths.get("src", "test", "data", "JsonSerializableAddressBookTest"); private static final Path TYPICAL_PERSONS_FILE = TEST_DATA_FOLDER.resolve("typicalPersonsAddressBook.json"); private static final Path INVALID_PERSON_FILE = TEST_DATA_FOLDER.resolve("invalidPersonAddressBook.json"); private static final Path DUPLICATE_PERSON_FILE = TEST_DATA_FOLDER.resolve("duplicatePersonAddressBook.json"); - @Rule - public ExpectedException thrown = ExpectedException.none(); - /*@Test public void toModelType_typicalPersonsFile_success() throws Exception { JsonSerializableAddressBook dataFromFile = JsonUtil.readJsonFile(TYPICAL_PERSONS_FILE, diff --git a/src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java b/src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java index ad74ffc53ae4..ed6556265226 100644 --- a/src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java +++ b/src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java @@ -12,20 +12,20 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; + import seedu.address.commons.core.GuiSettings; import seedu.address.commons.exceptions.DataConversionException; import seedu.address.model.UserPrefs; public class JsonUserPrefsStorageTest { - - private static final Path TEST_DATA_FOLDER = Paths.get("src", "test", "data", "JsonUserPrefsStorageTest"); - @Rule public ExpectedException thrown = ExpectedException.none(); @Rule public TemporaryFolder testFolder = new TemporaryFolder(); + private static final Path TEST_DATA_FOLDER = Paths.get("src", "test", "data", "JsonUserPrefsStorageTest"); + @Test public void readUserPrefs_nullFilePath_throwsNullPointerException() throws DataConversionException { thrown.expect(NullPointerException.class); diff --git a/src/test/java/seedu/address/storage/StorageManagerTest.java b/src/test/java/seedu/address/storage/StorageManagerTest.java index 2e8f8512fa96..696897642f30 100644 --- a/src/test/java/seedu/address/storage/StorageManagerTest.java +++ b/src/test/java/seedu/address/storage/StorageManagerTest.java @@ -9,6 +9,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; + import seedu.address.commons.core.GuiSettings; import seedu.address.model.UserPrefs; diff --git a/src/test/java/seedu/address/ui/BrowserPanelTest.java b/src/test/java/seedu/address/ui/BrowserPanelTest.java index ac41bd8f4327..1cfebcb6b5a2 100644 --- a/src/test/java/seedu/address/ui/BrowserPanelTest.java +++ b/src/test/java/seedu/address/ui/BrowserPanelTest.java @@ -6,10 +6,11 @@ import java.net.URL; -import guitests.guihandles.BrowserPanelHandle; -import javafx.beans.property.SimpleObjectProperty; import org.junit.Before; import org.junit.Test; + +import guitests.guihandles.BrowserPanelHandle; +import javafx.beans.property.SimpleObjectProperty; import seedu.address.model.volunteer.Volunteer; public class BrowserPanelTest extends GuiUnitTest { diff --git a/src/test/java/seedu/address/ui/GuiUnitTest.java b/src/test/java/seedu/address/ui/GuiUnitTest.java index b7ce09ccb457..d163c5748337 100644 --- a/src/test/java/seedu/address/ui/GuiUnitTest.java +++ b/src/test/java/seedu/address/ui/GuiUnitTest.java @@ -2,10 +2,11 @@ import java.util.Optional; +import org.junit.Rule; + import guitests.GuiRobot; import guitests.guihandles.exceptions.NodeNotFoundException; import javafx.scene.Node; -import org.junit.Rule; import seedu.address.ui.testutil.UiPartRule; /** diff --git a/src/test/java/seedu/address/ui/HelpWindowTest.java b/src/test/java/seedu/address/ui/HelpWindowTest.java index ce3c892420fa..da285ab5b2ba 100644 --- a/src/test/java/seedu/address/ui/HelpWindowTest.java +++ b/src/test/java/seedu/address/ui/HelpWindowTest.java @@ -8,12 +8,13 @@ import java.net.URL; -import guitests.guihandles.HelpWindowHandle; -import javafx.stage.Stage; import org.junit.Before; import org.junit.Test; import org.testfx.api.FxToolkit; +import guitests.guihandles.HelpWindowHandle; +import javafx.stage.Stage; + public class HelpWindowTest extends GuiUnitTest { private HelpWindow helpWindow; diff --git a/src/test/java/seedu/address/ui/MainWindowCloseTest.java b/src/test/java/seedu/address/ui/MainWindowCloseTest.java index e575c4cee04d..e63967f1b926 100644 --- a/src/test/java/seedu/address/ui/MainWindowCloseTest.java +++ b/src/test/java/seedu/address/ui/MainWindowCloseTest.java @@ -5,15 +5,16 @@ import java.util.Collections; -import guitests.guihandles.HelpWindowHandle; -import guitests.guihandles.StageHandle; -import javafx.stage.Stage; -import javafx.stage.WindowEvent; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.testfx.api.FxToolkit; + +import guitests.guihandles.HelpWindowHandle; +import guitests.guihandles.StageHandle; +import javafx.stage.Stage; +import javafx.stage.WindowEvent; import seedu.address.logic.LogicManager; import seedu.address.model.ModelManager; import seedu.address.storage.JsonAddressBookStorage; diff --git a/src/test/java/seedu/address/ui/ResultDisplayTest.java b/src/test/java/seedu/address/ui/ResultDisplayTest.java index 5d8ca35fb414..4f7a8562e651 100644 --- a/src/test/java/seedu/address/ui/ResultDisplayTest.java +++ b/src/test/java/seedu/address/ui/ResultDisplayTest.java @@ -2,10 +2,11 @@ import static org.junit.Assert.assertEquals; -import guitests.guihandles.ResultDisplayHandle; import org.junit.Before; import org.junit.Test; +import guitests.guihandles.ResultDisplayHandle; + public class ResultDisplayTest extends GuiUnitTest { private ResultDisplay resultDisplay; diff --git a/src/test/java/seedu/address/ui/StatusBarFooterTest.java b/src/test/java/seedu/address/ui/StatusBarFooterTest.java index 9e9b1a815bdc..cf7990094074 100644 --- a/src/test/java/seedu/address/ui/StatusBarFooterTest.java +++ b/src/test/java/seedu/address/ui/StatusBarFooterTest.java @@ -12,11 +12,12 @@ import java.time.ZoneId; import java.util.Date; -import guitests.guihandles.StatusBarFooterHandle; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; + +import guitests.guihandles.StatusBarFooterHandle; import seedu.address.model.AddressBook; public class StatusBarFooterTest extends GuiUnitTest { diff --git a/src/test/java/seedu/address/ui/UiPartTest.java b/src/test/java/seedu/address/ui/UiPartTest.java index c3749bfa95f2..00bffd0d5608 100644 --- a/src/test/java/seedu/address/ui/UiPartTest.java +++ b/src/test/java/seedu/address/ui/UiPartTest.java @@ -5,11 +5,12 @@ import java.net.URL; -import javafx.fxml.FXML; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; + +import javafx.fxml.FXML; import seedu.address.MainApp; import seedu.address.testutil.Assert; diff --git a/src/test/java/seedu/address/ui/testutil/UiPartRule.java b/src/test/java/seedu/address/ui/testutil/UiPartRule.java index 3527883bae93..ec8206a546dd 100644 --- a/src/test/java/seedu/address/ui/testutil/UiPartRule.java +++ b/src/test/java/seedu/address/ui/testutil/UiPartRule.java @@ -2,9 +2,10 @@ import java.util.concurrent.TimeoutException; +import org.testfx.api.FxToolkit; + import javafx.scene.Parent; import javafx.scene.Scene; -import org.testfx.api.FxToolkit; import seedu.address.ui.UiPart; /** diff --git a/src/test/java/systemtests/ClockRule.java b/src/test/java/systemtests/ClockRule.java index 03321371ca37..20464b8fb0f3 100644 --- a/src/test/java/systemtests/ClockRule.java +++ b/src/test/java/systemtests/ClockRule.java @@ -7,6 +7,7 @@ import org.junit.rules.TestRule; import org.junit.runner.Description; import org.junit.runners.model.Statement; + import seedu.address.ui.StatusBarFooter; /**