Skip to content

Commit a48cafc

Browse files
committed
Add manual testing for Add a Buyer
Add manual test cases for add buyer command.
1 parent 3777d70 commit a48cafc

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

docs/DeveloperGuide.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,39 @@ testers are expected to do more *exploratory* testing.
955955
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` <br>
956956
**Expected**: No seller is added. Error indicating that the house already existed in the data. <br>
957957

958+
[//]: # (@@author zengzihui)
959+
### Adding a buyer
960+
961+
**Prerequisites:**
962+
- List all persons using the `list` command.
963+
- There is currently no `person` with the name "James Cook", "Kris Hua". "John Carl 1" exists as a seller in EstateEase.<br>
964+
965+
1. **Add buyer**
966+
1. **Test case** (add a `buyer` named `James Cook`): `addBuyer n/James Cook p/98753432 e/jamescook@example.com budget/550000 type/Hdb`<br>
967+
**Expected**: A new buyer is added, with name `James Cook`, phone `98753432`, email `jamescook@example.com`, budget `550000`, preferred housing type `Hdb`<br><br>
968+
969+
2. **Invalid format**
970+
1. **Test case** (add a `buyer` without compulsory details): `addBuyer` <br>
971+
**Expected**: No buyer is added. Error indicating invalid format with constraints shown. <br><br>
972+
973+
2. **Test case** (add a `buyer` with an empty field for type): `addBuyer n/Kris Hua p/98765432 e/krishua@example.com budget/99999900` <br>
974+
**Expected:** No buyer is added. Error indicating invalid command format. <br><br>
975+
976+
3. **Invalid (Duplicate)**
977+
1. **Test case** (Duplicate person -> seller and buyer cannot be same name): `addBuyer n/John Carl 1 p/98765432 e/johncarl1@example.com budget/550000 type/Hdb`
978+
**Expected**: No buyer is added. Error indicating that the person already existed in the data. <br><br>
979+
980+
4. **Invalid Value for certain fields**
981+
1. **Test case** (add a `buyer` with an invalid `Preferred Housing Type`): `addBuyer n/Neo Ng p/98765432 e/neong@examaple.com budget/99999900 type/HDB` <br>
982+
**Expected:** No buyer is added. Error indicating HousingType should only be 'Landed', 'Hdb' or 'Condominium'. HousingType is case-sensitive. <br><br>
983+
984+
2. **Test case** (add a `buyer` with an invalid `budget`): `addBuyer n/Grace Tan p/98765432 e/gracetan@examaple.com budget/-99999900 type/Hdb` <br>
985+
**Expected:** No buyer is added. Error indicating budget should be a positive number. <br><br>
986+
987+
3. **Test case** (add a `buyer` with an invalid `budget`): `addBuyer n/Chris Ong p/98765432 e/chrisong@examaple.com budget/aa type/Hdb` <br>
988+
**Expected:** No buyer is added. Error indicating budget should be a positive number. <br><br>
989+
990+
958991
[//]: # (@@author redcolorbicycle)
959992
### Adding a house to a seller
960993

0 commit comments

Comments
 (0)