From 8c7c4ca6a1da517304c6b825b96e1478843de443 Mon Sep 17 00:00:00 2001 From: KhoonSun47 Date: Sat, 13 Apr 2024 23:02:31 +0800 Subject: [PATCH 1/5] Update Documentation - DeveloperGuide.md: Update manual testing for addSeller --- docs/DeveloperGuide.md | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 9ab3de811ab..d3626317d4a 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -897,7 +897,8 @@ testers are expected to do more *exploratory* testing. 1. Download the jar file and copy into an empty folder - 1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum. + 1. Double-click the jar file + Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum. 1. Saving window preferences @@ -914,8 +915,8 @@ testers are expected to do more *exploratory* testing. 1. **Loading Data:** - To test the application's response to a missing data folder or `addressbook.json` file, manually delete the `data` folder or the `addressbook.json` file from it. - - The application should automatically populate EstateEase with sample data, displaying buyers and sellers, where sellers are associated with houses. - + - The application should automatically populate EstateEase with sample data, displaying buyers and sellers, where sellers are associated with houses.
+
1. **Dealing with Corrupted Data Files** 1. **Loading Data:** @@ -926,6 +927,35 @@ testers are expected to do more *exploratory* testing. - These three actions violates EstateEase's constraints against duplicate houses, person and incorrect format, hence making the `addressbook.json` corrupted. - The application should automatically detect this, and display an empty EstateEase. +[//]: # (@@author KhoonSun47) +### Adding a seller + +1. Prerequisites: List all persons using the `list` command. There is currently no `person` with the name "John Carl", "John Felix", "John Zy".

+ +2. Test case (add a `seller` named `John Carl` with a house `Hdb`): `addSeller n/John Carl p/98765432 e/johncarl@example.com type/Hdb street/Clementi Ave 2 blk/311 level/02 unitNo/25 postal/578578 price/999999999`
+ Expected Output: `New seller added= John Carl; Phone= 98765432; Email= johncarl@example.com`
+ Expected: A new seller is added, with name `John Carl`, phone `98765432`, email `johncarl@example.com` and `Hdb` house details with street `Clementi Ave 2`, with block `311`, with level `02`, with unit number `25`, with postal code `578578` and price `999999999`.

+ +3. Test case (add a `seller` named `John Felix` with a house `Condominium`): `addSeller n/John Felix p/98765433 e/johnfelix@example.com type/Condominium street/Clementi Ave 3 blk/N/A level/03 unitNo/26 postal/578579 price/100000`
+ Expected Output: `New seller added= John Felix; Phone= 98765433; Email= johnfelix@example.com`
+ Expected: A new seller is added, with name `John Felix`, phone `98765433`, email `johnfelix@example.com` and `Condominium` house details with street `Clementi Ave 3`, with block `N/A`, with level `03`, with unit number `26`, with postal code `578579` and price `100000`.

+ +4. Test case (add a `seller` named `John Zy` with a house `Landed`): `addSeller n/John Zy p/98765434 e/johnzy@example.com type/Landed street/Clementi Ave 4 unitNo/26 postal/578580 price/1000000`
+ Expected Output: `New seller added= John Zy; Phone= 98765434; Email= johnzy@example.com`
+ Expected: A new seller is added, with name `John Zy`, phone `98765434`, email `ohnzy@example.com` and `Landed` house details with street `Clementi Ave 4`, with unit number `26`, with postal code `578580` and price `1000000`.

+ +5. Test case (add a `seller` without compulsory details): `addSeller`
+ Expected Output: `Invalid command format! addSeller: Adds a seller to EstateEase. Parameters: n/NAME p/PHONE e/EMAIL type/HOUSING_TYPE street/STREET blk/BLOCK level/LEVEL unitNo/UNIT NUMBER postal/POSTAL CODE price/PRICE Example: addSeller n/John Doe p/98765432 e/johnd@example.com type/Hdb street/Clementi Ave 2 blk/311 level/02 unitNo/25 postal/578578 price/999999999`
+ Expected: No seller is added. Error indicating invalid format with constraints shown.

+ +6. Test case (Duplicate seller -> seller and buyer cannot be same name): `addSeller n/John Carl p/98765432 e/johnd@example.com type/Landed street/Clementi Ave 2 unitNo/25 postal/578578 price/10000` + Expected Output: `This person already exists in EstateEase`
+ Expected: No seller is added. Error indicating that the person already existed in the data.

+ +7. Test case (Duplicate house): `addSeller n/Carl Lim p/98765432 e/johncarl@example.com type/Hdb street/Clementi Ave 2 blk/311 level/02 unitNo/25 postal/578578 price/999999999`
+ Expected Output: `This house already exists in EstateEase`
+ Expected: No seller is added. Error indicating that the house already existed in the data.
+ [//]: # (@@author zengzihui) ### Viewing a person @@ -1042,8 +1072,8 @@ similar to the test cases found in `Editing Seller Details`. - If the `data` folder is deleted, the application will recreate it along with a new `addressbook.json` file upon executing a valid command. - If only the `addressbook.json` file is deleted, it will be recreated within the existing `data` folder upon executing a valid command. - - The application saves the sample data to `addressbook.json` upon executing a valid command. - + - The application saves the sample data to `addressbook.json` upon executing a valid command.
+
1. **Dealing with Corrupted Data Files** 1. **Saving Data:** From 5f2115cc07e7a2b56800c034cfdd335c7bb73610 Mon Sep 17 00:00:00 2001 From: KhoonSun47 Date: Sat, 13 Apr 2024 23:14:25 +0800 Subject: [PATCH 2/5] Update Documentation: - DeveloperGuide.md: Remove expected output --- docs/DeveloperGuide.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index d3626317d4a..e0195a7d85a 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -933,27 +933,21 @@ testers are expected to do more *exploratory* testing. 1. Prerequisites: List all persons using the `list` command. There is currently no `person` with the name "John Carl", "John Felix", "John Zy".

2. Test case (add a `seller` named `John Carl` with a house `Hdb`): `addSeller n/John Carl p/98765432 e/johncarl@example.com type/Hdb street/Clementi Ave 2 blk/311 level/02 unitNo/25 postal/578578 price/999999999`
- Expected Output: `New seller added= John Carl; Phone= 98765432; Email= johncarl@example.com`
Expected: A new seller is added, with name `John Carl`, phone `98765432`, email `johncarl@example.com` and `Hdb` house details with street `Clementi Ave 2`, with block `311`, with level `02`, with unit number `25`, with postal code `578578` and price `999999999`.

3. Test case (add a `seller` named `John Felix` with a house `Condominium`): `addSeller n/John Felix p/98765433 e/johnfelix@example.com type/Condominium street/Clementi Ave 3 blk/N/A level/03 unitNo/26 postal/578579 price/100000`
- Expected Output: `New seller added= John Felix; Phone= 98765433; Email= johnfelix@example.com`
Expected: A new seller is added, with name `John Felix`, phone `98765433`, email `johnfelix@example.com` and `Condominium` house details with street `Clementi Ave 3`, with block `N/A`, with level `03`, with unit number `26`, with postal code `578579` and price `100000`.

4. Test case (add a `seller` named `John Zy` with a house `Landed`): `addSeller n/John Zy p/98765434 e/johnzy@example.com type/Landed street/Clementi Ave 4 unitNo/26 postal/578580 price/1000000`
- Expected Output: `New seller added= John Zy; Phone= 98765434; Email= johnzy@example.com`
Expected: A new seller is added, with name `John Zy`, phone `98765434`, email `ohnzy@example.com` and `Landed` house details with street `Clementi Ave 4`, with unit number `26`, with postal code `578580` and price `1000000`.

5. Test case (add a `seller` without compulsory details): `addSeller`
- Expected Output: `Invalid command format! addSeller: Adds a seller to EstateEase. Parameters: n/NAME p/PHONE e/EMAIL type/HOUSING_TYPE street/STREET blk/BLOCK level/LEVEL unitNo/UNIT NUMBER postal/POSTAL CODE price/PRICE Example: addSeller n/John Doe p/98765432 e/johnd@example.com type/Hdb street/Clementi Ave 2 blk/311 level/02 unitNo/25 postal/578578 price/999999999`
Expected: No seller is added. Error indicating invalid format with constraints shown.

6. Test case (Duplicate seller -> seller and buyer cannot be same name): `addSeller n/John Carl p/98765432 e/johnd@example.com type/Landed street/Clementi Ave 2 unitNo/25 postal/578578 price/10000` - Expected Output: `This person already exists in EstateEase`
Expected: No seller is added. Error indicating that the person already existed in the data.

7. Test case (Duplicate house): `addSeller n/Carl Lim p/98765432 e/johncarl@example.com type/Hdb street/Clementi Ave 2 blk/311 level/02 unitNo/25 postal/578578 price/999999999`
- Expected Output: `This house already exists in EstateEase`
Expected: No seller is added. Error indicating that the house already existed in the data.
[//]: # (@@author zengzihui) From 82451375c5c18330025e2abd567015a16deeaa6e Mon Sep 17 00:00:00 2001 From: KhoonSun47 Date: Sat, 13 Apr 2024 23:28:13 +0800 Subject: [PATCH 3/5] Update Documentation: DeveloperGuide.md: Update indentation --- docs/DeveloperGuide.md | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 36d3a3f3787..42b72875126 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -930,25 +930,30 @@ testers are expected to do more *exploratory* testing. [//]: # (@@author KhoonSun47) ### Adding a seller -1. Prerequisites: List all persons using the `list` command. There is currently no `person` with the name "John Carl", "John Felix", "John Zy".

+1. **Prerequisites:** + 1. List all persons using the `list` command. + 2. There is currently no `person` with the name "John Carl", "John Felix", "John Zy".

-2. Test case (add a `seller` named `John Carl` with a house `Hdb`): `addSeller n/John Carl p/98765432 e/johncarl@example.com type/Hdb street/Clementi Ave 2 blk/311 level/02 unitNo/25 postal/578578 price/999999999`
- Expected: A new seller is added, with name `John Carl`, phone `98765432`, email `johncarl@example.com` and `Hdb` house details with street `Clementi Ave 2`, with block `311`, with level `02`, with unit number `25`, with postal code `578578` and price `999999999`.

+1. **Add seller** + 1. **Test case** (add a `seller` named `John Carl` with a house `Hdb`): `addSeller n/John Carl p/98765432 e/johncarl@example.com type/Hdb street/Clementi Ave 2 blk/311 level/02 unitNo/25 postal/578578 price/999999999`
+ **Expected**: A new seller is added, with name `John Carl`, phone `98765432`, email `johncarl@example.com` and `Hdb` house details with street `Clementi Ave 2`, with block `311`, with level `02`, with unit number `25`, with postal code `578578` and price `999999999`.

-3. Test case (add a `seller` named `John Felix` with a house `Condominium`): `addSeller n/John Felix p/98765433 e/johnfelix@example.com type/Condominium street/Clementi Ave 3 blk/N/A level/03 unitNo/26 postal/578579 price/100000`
- Expected: A new seller is added, with name `John Felix`, phone `98765433`, email `johnfelix@example.com` and `Condominium` house details with street `Clementi Ave 3`, with block `N/A`, with level `03`, with unit number `26`, with postal code `578579` and price `100000`.

+ 2. **Test case** (add a `seller` named `John Felix` with a house `Condominium`): `addSeller n/John Felix p/98765433 e/johnfelix@example.com type/Condominium street/Clementi Ave 3 blk/N/A level/03 unitNo/26 postal/578579 price/100000`
+ **Expected**: A new seller is added, with name `John Felix`, phone `98765433`, email `johnfelix@example.com` and `Condominium` house details with street `Clementi Ave 3`, with block `N/A`, with level `03`, with unit number `26`, with postal code `578579` and price `100000`.

-4. Test case (add a `seller` named `John Zy` with a house `Landed`): `addSeller n/John Zy p/98765434 e/johnzy@example.com type/Landed street/Clementi Ave 4 unitNo/26 postal/578580 price/1000000`
- Expected: A new seller is added, with name `John Zy`, phone `98765434`, email `ohnzy@example.com` and `Landed` house details with street `Clementi Ave 4`, with unit number `26`, with postal code `578580` and price `1000000`.

+ 3. **Test case** (add a `seller` named `John Zy` with a house `Landed`): `addSeller n/John Zy p/98765434 e/johnzy@example.com type/Landed street/Clementi Ave 4 unitNo/26 postal/578580 price/1000000`
+ **Expected**: A new seller is added, with name `John Zy`, phone `98765434`, email `ohnzy@example.com` and `Landed` house details with street `Clementi Ave 4`, with unit number `26`, with postal code `578580` and price `1000000`.

-5. Test case (add a `seller` without compulsory details): `addSeller`
- Expected: No seller is added. Error indicating invalid format with constraints shown.

+2. **Invalid format** + 1. **Test case** (add a `seller` without compulsory details): `addSeller`
+ **Expected**: No seller is added. Error indicating invalid format with constraints shown.

-6. Test case (Duplicate seller -> seller and buyer cannot be same name): `addSeller n/John Carl p/98765432 e/johnd@example.com type/Landed street/Clementi Ave 2 unitNo/25 postal/578578 price/10000` - Expected: No seller is added. Error indicating that the person already existed in the data.

+3. **Invalid (Duplicate)** + 1. **Test case** (Duplicate seller -> seller and buyer cannot be same name): `addSeller n/John Carl p/98765432 e/johnd@example.com type/Landed street/Clementi Ave 2 unitNo/25 postal/578578 price/10000` + **Expected**: No seller is added. Error indicating that the person already existed in the data.

-7. Test case (Duplicate house): `addSeller n/Carl Lim p/98765432 e/johncarl@example.com type/Hdb street/Clementi Ave 2 blk/311 level/02 unitNo/25 postal/578578 price/999999999`
- Expected: No seller is added. Error indicating that the house already existed in the data.
+ 2. **Test case** (Duplicate house): `addSeller n/Carl Lim p/98765432 e/johncarl@example.com type/Hdb street/Clementi Ave 2 blk/311 level/02 unitNo/25 postal/578578 price/999999999`
+ **Expected**: No seller is added. Error indicating that the house already existed in the data.
[//]: # (@@author redcolorbicycle) ### Adding a house to a seller From e723bae714d699bd9ea445f8fa6f007331e4c768 Mon Sep 17 00:00:00 2001 From: KhoonSun47 Date: Sat, 13 Apr 2024 23:37:24 +0800 Subject: [PATCH 4/5] Update Documentation - DeveloperGuide.md: Update indentation --- docs/DeveloperGuide.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 42b72875126..74476c6715d 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -930,9 +930,9 @@ testers are expected to do more *exploratory* testing. [//]: # (@@author KhoonSun47) ### Adding a seller -1. **Prerequisites:** - 1. List all persons using the `list` command. - 2. There is currently no `person` with the name "John Carl", "John Felix", "John Zy".

+**Prerequisites:** +- List all persons using the `list` command. +- There is currently no `person` with the name "John Carl", "John Felix", "John Zy".
1. **Add seller** 1. **Test case** (add a `seller` named `John Carl` with a house `Hdb`): `addSeller n/John Carl p/98765432 e/johncarl@example.com type/Hdb street/Clementi Ave 2 blk/311 level/02 unitNo/25 postal/578578 price/999999999`
From fc469437fd88e3d18ee7988f8b1c7c1f2334db7a Mon Sep 17 00:00:00 2001 From: KhoonSun47 Date: Sat, 13 Apr 2024 23:44:48 +0800 Subject: [PATCH 5/5] Update DeveloperGuide.md based on comments given --- docs/DeveloperGuide.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 74476c6715d..9b1d5ebcadf 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -935,21 +935,21 @@ testers are expected to do more *exploratory* testing. - There is currently no `person` with the name "John Carl", "John Felix", "John Zy".
1. **Add seller** - 1. **Test case** (add a `seller` named `John Carl` with a house `Hdb`): `addSeller n/John Carl p/98765432 e/johncarl@example.com type/Hdb street/Clementi Ave 2 blk/311 level/02 unitNo/25 postal/578578 price/999999999`
- **Expected**: A new seller is added, with name `John Carl`, phone `98765432`, email `johncarl@example.com` and `Hdb` house details with street `Clementi Ave 2`, with block `311`, with level `02`, with unit number `25`, with postal code `578578` and price `999999999`.

+ 1. **Test case** (add a `seller` named `John Carl 1` with a house `Hdb`): `addSeller n/John Carl 1 p/98765432 e/johncarl1@example.com type/Hdb street/Clementi Ave 2 blk/311 level/02 unitNo/25 postal/578578 price/999999999`
+ **Expected**: A new seller is added, with name `John Carl 1`, phone `98765432`, email `johncarl@example.com` and `Hdb` house details with street `Clementi Ave 2`, with block `311`, with level `02`, with unit number `25`, with postal code `578578` and price `999999999`.

2. **Test case** (add a `seller` named `John Felix` with a house `Condominium`): `addSeller n/John Felix p/98765433 e/johnfelix@example.com type/Condominium street/Clementi Ave 3 blk/N/A level/03 unitNo/26 postal/578579 price/100000`
**Expected**: A new seller is added, with name `John Felix`, phone `98765433`, email `johnfelix@example.com` and `Condominium` house details with street `Clementi Ave 3`, with block `N/A`, with level `03`, with unit number `26`, with postal code `578579` and price `100000`.

- 3. **Test case** (add a `seller` named `John Zy` with a house `Landed`): `addSeller n/John Zy p/98765434 e/johnzy@example.com type/Landed street/Clementi Ave 4 unitNo/26 postal/578580 price/1000000`
- **Expected**: A new seller is added, with name `John Zy`, phone `98765434`, email `ohnzy@example.com` and `Landed` house details with street `Clementi Ave 4`, with unit number `26`, with postal code `578580` and price `1000000`.

+ 3. **Test case** (add a `seller` named `John Carl 2` with a house `Landed`): `addSeller n/John Carl 2 p/98765434 e/johncarl2@example.com type/Landed street/Clementi Ave 4 unitNo/26 postal/578580 price/1000000`
+ **Expected**: A new seller is added, with name `John Carl 2`, phone `98765434`, email `johncarl2@example.com` and `Landed` house details with street `Clementi Ave 4`, with unit number `26`, with postal code `578580` and price `1000000`.

2. **Invalid format** 1. **Test case** (add a `seller` without compulsory details): `addSeller`
**Expected**: No seller is added. Error indicating invalid format with constraints shown.

3. **Invalid (Duplicate)** - 1. **Test case** (Duplicate seller -> seller and buyer cannot be same name): `addSeller n/John Carl p/98765432 e/johnd@example.com type/Landed street/Clementi Ave 2 unitNo/25 postal/578578 price/10000` + 1. **Test case** (Duplicate seller -> seller and buyer cannot be same name): `addSeller n/John Carl 1 p/98765432 e/johncarl1@example.com type/Landed street/Clementi Ave 2 unitNo/25 postal/578578 price/10000` **Expected**: No seller is added. Error indicating that the person already existed in the data.

2. **Test case** (Duplicate house): `addSeller n/Carl Lim p/98765432 e/johncarl@example.com type/Hdb street/Clementi Ave 2 blk/311 level/02 unitNo/25 postal/578578 price/999999999`