From f59fb7c82063d195ec2e5e3f40f3d792b87aabb3 Mon Sep 17 00:00:00 2001 From: zengzihui Date: Wed, 20 Mar 2024 16:59:34 +0800 Subject: [PATCH 1/6] Fix contact list not displaying issue and add BuyerBuilder Fix the Label id in PersonCardList.fmxl to solve the contact list not displaying issue. Add BuyerBuilder to create buyer object for testing, separating it out from PersonBuilder. --- .../seedu/address/model/person/Buyer.java | 12 +-- src/main/resources/view/PersonListCard.fxml | 2 +- .../seedu/address/model/person/BuyerTest.java | 2 + .../seedu/address/testutil/BuyerBuilder.java | 91 +++++++++++++++++++ 4 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 src/test/java/seedu/address/testutil/BuyerBuilder.java diff --git a/src/main/java/seedu/address/model/person/Buyer.java b/src/main/java/seedu/address/model/person/Buyer.java index 19496b5c183..385d13eee38 100644 --- a/src/main/java/seedu/address/model/person/Buyer.java +++ b/src/main/java/seedu/address/model/person/Buyer.java @@ -19,11 +19,11 @@ public class Buyer extends Person { * @param name The name of the buyer. * @param phone The phone number of the buyer. * @param email The email address of the buyer. - * @param housingtype The type of housing the buyer wants. + * @param housingType The type of housing the buyer wants. * @param tags The tags associated with the buyer. */ - public Buyer(Name name, Phone phone, Email email, String housingtype, Set tags) { - super(name, phone, email, housingtype, tags); + public Buyer(Name name, Phone phone, Email email, String housingType, Set tags) { + super(name, phone, email, housingType, tags); this.house = null; } @@ -33,12 +33,12 @@ public Buyer(Name name, Phone phone, Email email, String housingtype, Set t * @param name The name of the buyer. * @param phone The phone number of the buyer. * @param email The email address of the buyer. - * @param housingtype The type of housing the buyer wants. + * @param housingType The type of housing the buyer wants. * @param house The house associated with the buyer. * @param tags The tags associated with the buyer. */ - public Buyer(Name name, Phone phone, Email email, String housingtype, House house, Set tags) { - super(name, phone, email, housingtype, tags); + public Buyer(Name name, Phone phone, Email email, String housingType, House house, Set tags) { + super(name, phone, email, housingType, tags); this.house = house; } } diff --git a/src/main/resources/view/PersonListCard.fxml b/src/main/resources/view/PersonListCard.fxml index 5e0baa17a55..c6107bdb78c 100644 --- a/src/main/resources/view/PersonListCard.fxml +++ b/src/main/resources/view/PersonListCard.fxml @@ -30,7 +30,7 @@