Skip to content

Commit

Permalink
UHM-1172 Fix appointment tests resources
Browse files Browse the repository at this point in the history
  • Loading branch information
pamcdm committed Apr 1, 2014
1 parent 96a111e commit 21655f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public enum AppointmentStatus {
"Cancelled", true, false), WAITING("Waiting", false, true), INCONSULTATION("In-Consultation", false, true), COMPLETED(
"Completed", false, false), MISSED("Missed", false, false), CANCELLED_AND_NEEDS_RESCHEDULE(
"Cancelled and Needs Reschedule", true, false);

private final String name;

/**
Expand Down Expand Up @@ -94,14 +95,6 @@ public boolean evaluate(Object o) {
return ((AppointmentStatus) o).isCancelled();
}
};

public static Predicate notCancelledPredicate = new Predicate() {

@Override
public boolean evaluate(Object o) {
return !((AppointmentStatus) o).isCancelled();
}
};

public static Predicate notCancelledPredicate = new Predicate() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void serialize(Appointment.AppointmentStatus appointmentStatus, JsonGener
jsonGenerator.writeFieldName("active");
jsonGenerator.writeBoolean(appointmentStatus.isActive());
jsonGenerator.writeFieldName("cancelled");
jsonGenerator.writeBoolean(appointmentStatus.isCancelled());
jsonGenerator.writeBoolean(appointmentStatus.isActive());
jsonGenerator.writeEndObject();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@
import static org.junit.Assert.assertTrue;

/**
<<<<<<< HEAD
* Tests Time Slot methods in the {@link AppointmentService} .
=======
* Tests Time Slot methods in the {@link AppointmentService} .
>>>>>>> f97b876... fixed which AppointmentStatuses are considered "cancelled"
* <<<<<<< HEAD Tests Time Slot methods in the {@link AppointmentService} . ======= Tests Time Slot
* methods in the {@link AppointmentService} . >>>>>>> f97b876... fixed which AppointmentStatuses
* are considered "cancelled"
*/
public class TimeSlotServiceTest extends BaseModuleContextSensitiveTest {

Expand Down Expand Up @@ -403,9 +401,9 @@ public void shouldGetOnlyAvailableTimeSlotsByConstraintsSortedByStartDate() thro
assertNotNull(result);
assertEquals(4, result.size());
assertEquals(5, result.get(0).getTimeSlotId().intValue());
assertEquals(4, result.get(1).getTimeSlotId().intValue());
assertEquals(8, result.get(2).getTimeSlotId().intValue());
assertEquals(9, result.get(3).getTimeSlotId().intValue());
assertEquals(4, result.get(1).getTimeSlotId().intValue());
assertEquals(8, result.get(2).getTimeSlotId().intValue());
assertEquals(9, result.get(3).getTimeSlotId().intValue());
}

}

0 comments on commit 21655f7

Please sign in to comment.