This project was adapted from AB-3's codebase.
Refer to the guide Setting up and getting started.
The Architecture Diagram given above explains the high-level design of the App.
Given below is a quick overview of main components and how they interact with each other.
Main components of the architecture
Main (consisting of classes Main and MainApp) is in charge of the app launch and shut down.
The bulk of the app's work is done by the following four components:
UI: The UI of the App.Logic: The command executor.Model: Holds the data of the App in memory.Storage: Reads data from, and writes data to, the hard disk.Commons represents a collection of classes used by multiple other components.
How the architecture components interact with each other
The Sequence Diagram below shows how the components interact with each other for the scenario where the user issues the command delete 1.
Each of the four main components (also shown in the diagram above),
interface with the same name as the Component.{Component Name}Manager class (which follows the corresponding API interface mentioned in the previous point.For example, the Logic component defines its API in the Logic.java interface and implements its functionality using the LogicManager.java class which follows the Logic interface. Other components interact with a given component through its interface rather than the concrete class (reason: to prevent outside component's being coupled to the implementation of a component), as illustrated in the (partial) class diagram below.
The sections below give more details of each component.
The API of this component is specified in Ui.java
The UI consists of a MainWindow that is made up of parts e.g.CommandBox, ResultDisplay, PersonListPanel, StatusBarFooter etc. All these, including the MainWindow, inherit from the abstract UiPart class which captures the commonalities between classes that represent parts of the visible GUI.
The UI component uses the JavaFx UI framework. The layout of these UI parts are defined in matching .fxml files that are in the src/main/resources/view folder. For example, the layout of the MainWindow is specified in MainWindow.fxml
The UI component,
Logic component.Model data so that the UI can be updated with the modified data.Logic component, because the UI relies on the Logic to execute commands.Model component, as it displays Person object residing in the Model.API : Logic.java
Here's a (partial) class diagram of the Logic component:
The sequence diagram below illustrates the interactions within the Logic component, taking execute("delete 1") API call as an example.
Note: The lifeline for DeleteCommandParser should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
How the Logic component works:
Logic is called upon to execute a command, it is passed to an AddressBookParser object which in turn creates a parser that matches the command (e.g., DeleteCommandParser) and uses it to parse the command.Command object (more precisely, an object of one of its subclasses e.g., DeleteCommand) which is executed by the LogicManager.Model when it is executed (e.g. to delete a person).Model) to achieve.CommandResult object which is returned back from Logic.Here are the other classes in Logic (omitted from the class diagram above) that are used for parsing a user command:
How the parsing works:
AddressBookParser class creates an XYZCommandParser (XYZ is a placeholder for the specific command name e.g., AddCommandParser) which uses the other classes shown above to parse the user command and create a XYZCommand object (e.g., AddCommand) which the AddressBookParser returns back as a Command object.XYZCommandParser classes (e.g., AddCommandParser, DeleteCommandParser, ...) inherit from the Parser interface so that they can be treated similarly where possible e.g, during testing.API : Model.java
The Model component,
Person objects (which are contained in a UniquePersonList object).Person objects (e.g., results of a search query) as a separate filtered list which is exposed to outsiders as an unmodifiable ObservableList<Person> that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.UserPref object that represents the user’s preferences. This is exposed to the outside as a ReadOnlyUserPref objects.Model represents data entities of the domain, they should make sense on their own without depending on other components)Note: An alternative (arguably, a more OOP) model is given below. It has a Tag list in the AddressBook, which Person references. This allows AddressBook to only require one Tag object per unique tag, instead of each Person needing their own Tag objects.
API : Storage.java
The Storage component,
AddressBookStorage and UserPrefStorage, which means it can be treated as either one (if only the functionality of only one is needed).Model component (because the Storage component's job is to save/retrieve objects that belong to the Model)Classes used by multiple components are in the seedu.address.commons package.
This section describes some noteworthy details on how certain features are implemented.
The proposed undo/redo mechanism is facilitated by VersionedAddressBook. It extends AddressBook with an undo/redo history, stored internally as an addressBookStateList and currentStatePointer. Additionally, it implements the following operations:
VersionedAddressBook#commit() — Saves the current address book state in its history.VersionedAddressBook#undo() — Restores the previous address book state from its history.VersionedAddressBook#redo() — Restores a previously undone address book state from its history.These operations are exposed in the Model interface as Model#commitAddressBook(), Model#undoAddressBook() and Model#redoAddressBook() respectively.
Given below is an example usage scenario and how the undo/redo mechanism behaves at each step.
Step 1. The user launches the application for the first time. The VersionedAddressBook will be initialized with the initial address book state, and the currentStatePointer pointing to that single address book state.
Step 2. The user executes delete 5 command to delete the 5th person in the address book. The delete command calls Model#commitAddressBook(), causing the modified state of the address book after the delete 5 command executes to be saved in the addressBookStateList, and the currentStatePointer is shifted to the newly inserted address book state.
Step 3. The user executes add n/David … to add a new person. The add command also calls Model#commitAddressBook(), causing another modified address book state to be saved into the addressBookStateList.
Note: If a command fails its execution, it will not call Model#commitAddressBook(), so the address book state will not be saved into the addressBookStateList.
Step 4. The user now decides that adding the person was a mistake, and decides to undo that action by executing the undo command. The undo command will call Model#undoAddressBook(), which will shift the currentStatePointer once to the left, pointing it to the previous address book state, and restores the address book to that state.
Note: If the currentStatePointer is at index 0, pointing to the initial AddressBook state, then there are no previous AddressBook states to restore. The undo command uses Model#canUndoAddressBook() to check if this is the case. If so, it will return an error to the user rather
than attempting to perform the undo.
The following sequence diagram shows how an undo operation goes through the Logic component:
Note: The lifeline for UndoCommand should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Similarly, how an undo operation goes through the Model component is shown below:
The redo command does the opposite — it calls Model#redoAddressBook(), which shifts the currentStatePointer once to the right, pointing to the previously undone state, and restores the address book to that state.
Note: If the currentStatePointer is at index addressBookStateList.size() - 1, pointing to the latest address book state, then there are no undone AddressBook states to restore. The redo command uses Model#canRedoAddressBook() to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo.
Step 5. The user then decides to execute the command list. Commands that do not modify the address book, such as list, will usually not call Model#commitAddressBook(), Model#undoAddressBook() or Model#redoAddressBook(). Thus, the addressBookStateList remains unchanged.
Step 6. The user executes clear, which calls Model#commitAddressBook(). Since the currentStatePointer is not pointing at the end of the addressBookStateList, all address book states after the currentStatePointer will be purged. Reason: It no longer makes sense to redo the add n/David … command. This is the behavior that most modern desktop applications follow.
The following activity diagram summarizes what happens when a user executes a new command:
Aspect: How undo & redo executes:
Alternative 1 (current choice): Saves the entire address book.
Alternative 2: Individual command knows how to undo/redo by itself.
delete, just save the person being deleted).This section is a list of fixes that we propose to add in the near future, to improve some of ClubConnect's known feature flaws.
add_event command is too restrictive as it only allows events of unique names to be added to ClubConnect's event list. However, we understand that our users often have recurring events, and such a restriction on the add_event command would ruin their user experience. We plan to allow events of the same name but non-overlapping duration window in the future, i.e. Orbital Workshop from 1 Oct 2024 to 7 Oct 2024 and Orbital Workshop from 10 Oct 2024 to 14 Oct 2024 can co-exist in ClubConnect's event list.2025 Orbital Workshop. To improve user experience, we plan to allow contacts / events to start with any character (while still making other commands that uses indexes and names work).list / list_events to display the contact / event list. However, we understand that this might be inconvenient for users, especially when using the assign and unassign commands, where users need to remember the index of the contact / event to use these commands using indices. To improve user experience, we plan to display the contact and event lists side-by-side, so that users do not need to type list / list_events to display the contacts / events, and make it easier to use assign and unassign commands. In addition, this would also fix the current GUI issue that we have, which shows an empty box at the bottom of the screen for contact list, and right below the status message for event list.add_event command is designed such that the event's description is a compulsory field. However, we understand that not all events have a description to it. Some events' names are self-explanatory and do not require a description. To improve user experience, we plan to make the EVENT_DESCRIPTION field optional in the future to provide more convenience.assign command does not cause any changes in the GUI with regard to the contact information of each person. This would make it difficult to see which events a person has been assigned to. To improve user experience, we plan to make the events that a person has been assigned to visible in the details of each contact in the GUI.search command: The current search command will return all contacts whose specified field matches any one of the keywords entered. This would make it inconvenient for users who have many contacts, and would like to do a more specific search for contacts whose specified field matches all of the keywords entered. The current search command also only searches one field at a time. This would make it inconvenient for user who would like to search for contacts using multiple fields at the same time. To improve user experience, we plan to support searches that can match multiple fields at the same time, or return only contacts that match with all specified keywords.Target user profile:
Computing Club Committee members
Value proposition: Streamline computing club's communication and organization with our address book app. Effortlessly manage member details, sponsor contacts, and event participants in one place. Enhance collaboration, boost engagement, and ensure seamless planning, all while saving time and reducing administrative hassle.
Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *, Exists - EXISTS, Not possible - N.A.
| Priority | As a … | I want to … | So that I can… |
|---|---|---|---|
* * * | Committee president | Search contacts by multiple criteria (e.g., job title, tags) | Find the right contacts even if I don’t remember their names |
* * * | Committee president | Filter the contacts to different types of events | Easily know who to contact for specific purposes, even with multiple ongoing events |
* * * | Committee member | Detect and merge duplicate contacts easily | Keep my address book clean and well-organized |
* * * | Committee president | Mass delete contacts | Easily remove all contacts related to one event after it's over |
* * | Committee president | Assign tasks and responsibilities to committee members | Ensure all activities are covered without confusion |
* * | Committee member | Receive notifications for upcoming meetings and events | Stay informed and participate on time |
* * | Events coordinator | Send out event reminders and notifications to members | Keep everyone informed and boost engagement |
* * | Committee member | Import contacts from a CSV file | Quickly populate the address book |
* * | Committee member | Export contacts to a CSV file | Share the contact list with others |
* * | Committee member | Customize the app's interface | Tailor the app to my preferences |
* * | Club member | View a list of upcoming events | Stay informed about club activities |
* * | Committee member | Add a new event to the calendar | Plan club activities |
* * | Committee member | Edit an existing event in the calendar | Update event details to reflect changes in club activities |
* | Committee president | Have a blacklist of participants | Keep track of people who are not allowed to join future events |
* | Committee member | Track event attendance | See who participated |
* | Secretary | Track meeting attendance | Maintain records of who participated in club activities |
* | Committee member | View a member's participation history | Recognize active members |
EXISTS | Committee member organizing events | Label each of my contacts | I can easily mass contact sponsors / participants / organizing committee, etc |
EXISTS | Committee member | Add a new member to the address book | Keep track of all members in the club |
EXISTS | Committee president | Delete contacts | Avoid contacting people no longer involved with the committee |
EXISTS | Committee president | Keep track of every member’s contact information, e.g., phone number, email address | Contact them during an emergency |
N.A. | Committee member | Password-protect sensitive contact information | Ensure my contacts remain private and secure |
N.A. | Communication committee member | Log all interactions with sponsors and partners | Reference past conversations and ensure nothing is overlooked |
N.A. | Committee member | Send a group email to all members | Communicate important information quickly |
N.A. | Committee member | Set reminders for upcoming events | Ensure I don’t miss important activities |
N.A. | Committee member | Integrate the app with my calendar | Automatically sync important events and reminders |
(For all use cases below, the System is the ClubConnect and the Actor is the User, unless specified otherwise)
Use case: UC01 - Add contact
MSS:
Extensions:
Use case: UC02 - Edit contact
MSS:
Extensions:
Use case: UC03 - Delete contact by index
MSS:
Extensions:
Use case: UC04 - Delete contact by name
MSS:
Extensions:
Use case: UC05 - Search for contact by criteria
MSS:
Extensions:
Use case: UC06 - Label a contact
MSS:
Extensions:
Use case: UC07 - Mass Delete
MSS:
Extensions:
Use case: UC08 - Filter content by type
MSS:
Extensions:
Use case: UC09 - Add event
MSS:
Extensions:
YYYY-MM-DD or dates are not valid, e.g. 2024-02-30 or event end date is earlier than the start date).
Use case: UC10 - Delete event by index
MSS:
Extensions:
Use case: UC11 - Delete event by name
MSS:
Extensions:
Use case: UC12 - Edit event
MSS:
Extensions:
Use Case: UC13 - Assign Event to Person
MSS:
Extensions:
Use case: UC14 - Unassign event from person
MSS:
Extensions:
Use Case: UC15 - Export Contacts
MSS:
Extensions:
Use Case: UC16 - Import Contacts from CSV
MSS:
Extensions:
17 or above installed.Given below are instructions to test the app manually.
Note: These instructions only provide a starting point for testers to work on; testers are expected to do more exploratory testing.
Initial launch
Download the jar file and copy into an empty folder.
Open your favourite CLI (Command Prompt, Windows Powershell, Terminal).
cd into the folder containing the jar file.
Run java -jar clubconnect.jar.
Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
Saving window preferences
Resize the window to an optimum size. Move the window to a different location. Close the window.
Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained.
Deleting a person while all persons are being shown
Prerequisites: List all persons using the list command. Multiple persons in the list.
Test case: delete 1
Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message.
Test case: delete 0
Expected: No contact is deleted. Error details shown in the status message. Status bar remains the same.
Other incorrect delete commands to try: delete, delete x (where x is larger than the list size)
Expected: Similar to previous.
Deleting a person while all persons are being shown using the sample address book given.
Prerequisites: No clubconnect.json file in the data folder (To populate the app with a sample address book).
Test case: delete David Li
Expected: Contact with name David Li is deleted from the list. Details of the deleted contact shown in the status message. This contact is provided by the sample address book when you first open the app.
Test case: delete irfan ibrahim
Expected: Contact with name Irfan Ibrahim is deleted from the list. Details of the deleted contact shown in the status message. This contact is provided by the sample address book when you first open the app.
Test case: delete roy
Expected: No contact is deleted. Error details shown in the status message. Status bar remains the same.
Deleting a person while in a filtered displayed list.
Prerequisites: Start with the sample address book and use a command that filters the current displayed contact list (Eg search n/charlotte).
Test case: delete 2
Expected: No contact is deleted. Error details shown in the status message. Status bar remains the same.
Test case: delete 1
Expected: Contact with name Charlotte Oliveiro is deleted from the list. Details of the deleted contact shown in the status message. This contact is provided by the sample address book when you first open the app.
Deleting multiple valid contacts by indices.
mass_delete 1 3 51, 3, and 5 are deleted from the address book. A success message is shown indicating that contacts with these indices have been successfully deleted.Deleting contacts with a mix of valid and invalid indices.
mass_delete 1 10 21 and 2 are deleted. Index 10 is invalid (assuming the list has fewer than 10 contacts). A success message is shown, indicating deletion of valid indices, followed by a message listing the invalid input 10.Deleting contacts with all invalid indices.
mass_delete 10 20 30Deleting contacts with non-integer inputs.
mass_delete 1 two 31 and 3 are deleted. The input two is invalid. A success message is shown for valid deletions, followed by a message listing the invalid input two.Deleting contacts with duplicate indices.
mass_delete 2 2 42 and 4 are deleted. A success message is shown indicating successful deletion of contacts at these indices. Duplicate indices do not affect the operation beyond the first valid occurrence.Deleting contacts with no indices provided.
mass_deleteSearching with zero keywords.
Test case: search a/
Expected: All contacts will be listed.
Test case: search e/
Expected: All contacts will be listed.
Test case: search n/
Expected: All contacts will be listed.
Test case: search p/
Expected: All contacts will be listed.
Test case: search t/
Expected: All contacts will be listed.
Searching with one keyword.
Test case: search a/street
Expected: Contacts with the substring street(case-insensitive) in their address will be listed.
Test case: search e/example
Expected: Contacts with the substring example (case-insensitive) in their email address will be listed.
Test case: search n/John
Expected: Contacts with the substring John (case-insensitive) in their name will be listed.
Test case: search p/123
Expected: Contacts with the substring 123 in their phone number will be listed.
Test case: search t/friend
Expected: Contacts with the tag friend (case-insensitive) will be listed.
Searching with multiple keywords.
Test case: search a/street ave
Expected: Contacts with the substring street or ave(case-insensitive) in their address will be listed.
Test case: search e/example domain
Expected: Contacts with the substring example or domain (case-insensitive) in their email address will be listed.
Test case: search n/John Doe
Expected: Contacts with the substring John or Doe (case-insensitive) in their name will be listed.
Test case: search p/123 456
Expected: Contacts with the substring 123 or 456 in their phone number will be listed.
Test case: search t/friend colleague
Expected: Contacts with the tag friend or colleague (case-insensitive) will be listed.
Searching with keyword that yield no results.
search a/gibberishAdding a new unique event.
Test case: add_event n/Meeting d/Monday Meeting f/2024-01-01 t/2024-01-01
Expected: An event with the name Meeting will be added to the event list. Details of added event shown in the status message.
Test case: add_event n/ d/Monday Meeting f/2024-01-01 t/2024-01-01
Expected: No event is added. Error details (Invalid Name) shown in the status message.
Test case: add_event d/Monday Meeting f/2024-01-01 t/2024-01-01
Expected: No event is added. Error details (Invalid Command Format) shown in the status message.
Test case: add_event n/Meeting d/ f/2024-01-01 t/2024-01-01
Expected: No event is added. Error details (Invalid Description) shown in the status message.
Test case: add_event n/Meeting d/Monday Meeting f/2024-0101 t/2024-01-01
Expected: No event is added. Error details (Invalid Date Format) shown in the status message.
Test case: add_event n/Meeting d/Monday Meeting f/2024-01-01 t/2023-01-01
Expected: No event is added. Error details (End date cannot be earlier than start date) shown in the status message.
Test case: add_event n/Meeting d/Monday Meeting f/2024-01-01 t/2024-02-30
Expected: No event is added. Error details (Invalid Date Format) shown in the status message.
Adding an event with the same name as an existing event.
add_event n/Meeting d/Duplicate Meeting f/2024-01-01 t/2024-01-01Deleting an event while all events are being shown
Prerequisites: List all events using the list_events command. Multiple events in the list.
Test case: delete_event 1
Expected: First event is deleted from the list. Details of the deleted event shown in the status message.
Test case: delete_event 0
Expected: No event is deleted. Error details shown in the status message. Status bar remains the same.
Other incorrect delete_event commands to try: delete_event, delete_event x (where x is larger than the list size)
Expected: Similar to previous.
Deleting an event while all events are being shown using the sample address book given.
Prerequisites: No clubconnect.json file in the data folder (To populate the app with a sample address book). List all events using the list_events command.
Test case: delete_event CS2103T Project Meeting
Expected: Event with name CS2103T Project Meeting is deleted from the list. Details of the deleted event shown in the status message. This event is provided by the sample address book when you first open the app.
Test case: delete_event orbital
Expected: No event is deleted. Error details shown in the status message. Status bar remains the same.
Test case: delete_event orbital workshop
Expected: Event with name Orbital Workshop is deleted from the list. Details of the deleted event shown in the status message. This event is provided by the sample address book when you first open the app.
Editing an existing event.
Test case: edit_event 1 n/Updated Meeting d/Updated description f/2024-10-02 t/2024-10-11
Expected: The event at index 1 is updated with the new name Updated Meeting, description Updated description, start date 2024-10-02, and end date 2024-10-11. Details of the edited event are shown in the status message.
Test case: edit_event 1 n/ d/Updated description f/2024-10-02 t/2024-10-11
Expected: No changes are made. Error details (Invalid Name) shown in the status message.
Test case: edit_event 1 d/ f/2024-10-02 t/2024-10-11
Expected: No changes are made. Error details (Invalid Description) shown in the status message.
Test case: edit_event 1 n/Updated Meeting d/Updated description f/2024-1002 t/2024-10-11
Expected: No changes are made. Error details (Invalid Date Format) shown in the status message.
Test case: edit_event 1 n/Updated Meeting d/Updated description f/2024-10-11 t/2024-10-02
Expected: No changes are made. Error details (End date cannot be earlier than start date) shown in the status message.
Test case: edit_event 1 n/Updated Meeting d/Updated description f/2024-10-02 t/2024-02-30
Expected: No changes are made. Error details (Invalid Date Format) shown in the status message.
Editing an event with an invalid index.
edit_event 10 n/Updated Meeting d/Updated description f/2024-10-02 t/2024-10-11Editing an event without specifying any changes.
edit_event 1Editing an event to have the same name as another existing event.
edit_event 1 n/Existing Event Name d/Updated description f/2024-10-02 t/2024-10-11Assigning an existing event to an existing person
Prerequisites: Ensure that the first person in the contact list is named Alice and the first event in the event list is named Meeting. Ensure that Alice is not already assigned to Meeting before each test case. More than 1 person and event should be present.
Test case: assign_event p/1 ev/1
Expected: Alice is assigned to Meeting, and a confirmation message displays the successful assignment.
Test case: assign_event p/1 ev/meeting
Expected: Alice is assigned to Meeting, and a confirmation message displays the successful assignment.
Test case: assign_event p/alice ev/1
Expected: Alice is assigned to Meeting, and a confirmation message displays the successful assignment.
Test case: assign_event p/alice ev/meeting
Expected: Alice is assigned to Meeting, and a confirmation message displays the successful assignment.
Test case: assign_event p/2 ev/1
Expected: The person at index 2 is assigned to Meeting, and a confirmation message displays the successful assignment.
Person or Event does not exist
Prerequisites: Ensure that person Bob and event Workshop do not exist in the app. Ensure that person Alice and event Meeting exist in the app.
Test case: assign_event p/bob ev/meeting
Expected: No person is assigned to Meeting. Error details (Person does not exist) shown in the status message.
Test case: assign_event p/alice ev/workshop
Expected: No person is assigned to any event. Error details (Event does not exist) shown in the status message.
Test case: assign_event p/0 ev/1
Expected: No person is assigned to the first event. Error details (Invalid Command Format) shown in the status message.
Test case: assign_event p/1 ev/0
Expected: No person is assigned to any event. Error details (Invalid Command Format) shown in the status message.
Test case: assign_event p/1 ev/999999
Expected: No person is assigned to any event. Error details (Invalid Event Index) shown in the status message.
Person already assigned to the Event
Prerequisites: Ensure that Alice is already assigned to Meeting.
Test case: assign_event p/1 ev/1
Expected: No new assignment is made. Error details (Person already assigned to Event) shown in the status message.
Test case: assign_event p/alice ev/meeting
Expected: No new assignment is made. Error details (Person already assigned to Event) shown in the status message.
Unassigning an existing event from an existing person
Prerequisites: Ensure that the first person in the contact list is named Alice and the first event in the event list is named Meeting. Ensure that only Alice is assigned to Meeting before each test case. More than 1 person and event should be present.
Test case: unassign_event p/1 ev/1
Expected: Alice is unassigned from Meeting in the status message.
Test case: unassign_event p/1 ev/meeting
Expected: Alice is unassigned from Meeting in the status message.
Test case: unassign_event p/alice ev/1
Expected: Alice is unassigned from Meeting in the status message.
Test case: unassign_event p/alice ev/meeting
Expected: Alice is unassigned from Meeting in the status message.
Test case: unassign_event p/2 ev/1
Expected: No person is unassigned from Meeting. Error details (Person not assigned to Event) shown in the status message.
Event / Person does not exist
Prerequisites: Ensure that person Bob and event Workshop do not exist in the app. Ensure that person Alice and event Meeting exists in the app.
Test case: unassign_event p/bob ev/meeting
Expected: No person is unassigned from Meeting. Error details (Person does not exist) shown in the status message.
Test case: unassign_event p/alice ev/workshop
Expected: No person is unassigned from any event. Error details (Event does not exist) shown in the status message.
Test case: unassign_event p/0 ev/1
Expected: No person is unassigned from the first event. Error details (Invalid Command Format) shown in the status message.
Test case: unassign_event p/1 ev/0
Expected: No person is unassigned from any event. Error details (Invalid Command Format) shown in the status message.
Test case: unassign_event p/1 ev/999999
Expected: No person is unassigned from any event. Error details (Invalid Event Index) shown in the status message.
Exporting when the export file does not exist
Prerequisites: Ensure the data directory exists. Ensure that ExportedContacts.csv does not exist in the data directory before each test case.
Test case: export
Expected: A success message confirms that contacts have been exported. Verify that ExportedContacts.csv now exists in the data directory.
Importing from an existing, correctly formatted file
Prerequisites: Ensure the data directory contains a file named contacts.csv with correctly formatted contact information (headers: Name,Phone Number,Email Address,Address,Tags). Ensure that some of the contacts in contacts.csv are not already in the address book.
Test case: import contacts.csv
Expected: A success message confirms that contacts from contacts.csv have been imported. Verify that the new contacts are now added to the address book, and existing contacts remain unchanged.
Importing from a non-existent file
Prerequisites: Ensure that the data directory exists but does not contain a file named nonexistent.csv.
Test case: import nonexistent.csv
Expected: No contacts are imported. An error message displays: "The specified file does not exist."
Importing from a file with an incorrect format
Prerequisites: Ensure the data directory contains a file named incorrect.csv with improperly formatted content (e.g., missing headers or incorrect number of columns).
Test case: import incorrect.csv
Expected: No contacts are imported. An error message displays: "The format of the specified file is incorrect."
Dealing with missing/corrupted data files
clubconnect.jar file. There should be a data folder in the same folder.data folder to go into the folder. There should be a clubconnect.json file inside.clubconnect.json file.