Skip to content

Commit

Permalink
Resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ararchch committed Apr 15, 2024
1 parent 2a3e52e commit d642a38
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 18 deletions.
11 changes: 0 additions & 11 deletions src/main/java/seedu/address/model/appointment/Appointment.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ public class Appointment {
// The date of the appointment
private final AppointmentDateTime appointmentDateTime;

// Message to outputs in case constraints are not met
private final AppointmentId appointmentId;

/**
* Constructs a new appointment instance
* @param doctorNric doctor in charge
Expand Down Expand Up @@ -121,14 +118,6 @@ public void setPatientNric(Nric nric) throws InvalidAppointmentException {
this.patientNric = nric;
}

/**
* Gets the ID of the appointment.
*
* @return AppointmentId of the appointment.
*/
public AppointmentId getAppointmentId() {
return this.appointmentId;
}

/**
* Gets date & time of the appointment.
Expand Down
4 changes: 1 addition & 3 deletions src/test/java/seedu/address/logic/LogicManagerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@
import seedu.address.model.ReadOnlyAddressBook;
import seedu.address.model.UserPrefs;
import seedu.address.model.appointment.Appointment;
import seedu.address.model.person.Doctor;
import seedu.address.model.person.Patient;
import seedu.address.model.appointment.AppointmentDateTime;
import seedu.address.model.person.Person;
import seedu.address.storage.JsonAddressBookStorage;
import seedu.address.storage.JsonUserPrefsStorage;
import seedu.address.storage.StorageManager;
import seedu.address.testutil.AppointmentBuilder;
import seedu.address.testutil.PatientBuilder;
public class LogicManagerTest {
private static final IOException DUMMY_IO_EXCEPTION = new IOException("dummy IO exception");
Expand Down
7 changes: 4 additions & 3 deletions src/test/java/seedu/address/model/ModelManagerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public void setPerson_validPerson_setsPerson() {
}

@Test
public void isValidAppointment_validAppointment_returnsTrue() {
public void isValidAppointment_validAppointment_returnsTrue() throws ParseException {
this.addPersonsForTest();
Appointment a = new AppointmentBuilder().withDoctor((Doctor) BROWN).withPatient((Patient) ALICE).build();
assertTrue(modelManager.isValidAppointment(a));
Expand All @@ -178,11 +178,12 @@ public void isValidAppointment_validAppointment_returnsTrue() {
@Test
public void isValidAppointment_invalidAppointment_returnsFalse() throws ParseException {
this.addPersonsForTest();
Appointment a = new Appointment(ALICE.getNric(), BROWN.getNric(), new AppointmentDateTime("2024-08-30 11:02"));
Appointment a = new Appointment(ALICE.getNric(), BROWN.getNric(),
new AppointmentDateTime("2024-08-30 11:02"), false);
assertFalse(modelManager.isValidAppointment(a));
}

private void addPersonsForTest() {
private void addPersonsForTest() throws ParseException {
Doctor d = (Doctor) BROWN;
Patient p = (Patient) ALICE;
modelManager.addPerson(d);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import seedu.address.logic.parser.exceptions.ParseException;
import seedu.address.model.appointment.exceptions.DuplicateAppointmentException;
import seedu.address.model.person.Doctor;
import seedu.address.testutil.AppointmentBuilder;

public class UniqueAppointmentListTest {
Expand Down

0 comments on commit d642a38

Please sign in to comment.