/** * @see ProgramWorkflowService#getPatientStateByUuid(String) */ @Test public void getPatientStateByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid() { Assert.assertNull(Context.getProgramWorkflowService().getPatientStateByUuid("some invalid uuid")); }
/** * @see ProgramWorkflowService#getPatientStateByUuid(String) */ @Test public void getPatientStateByUuid_shouldFindObjectGivenValidUuid() { String uuid = "ea89deaa-23cc-4840-92fe-63d199c37e4c"; PatientState patientState = Context.getProgramWorkflowService().getPatientStateByUuid(uuid); Assert.assertEquals(1, (int) patientState.getPatientStateId()); }
@Override public PatientState getByUniqueId(String uniqueId) { return Context.getProgramWorkflowService().getPatientStateByUuid(uniqueId); }
@Override public PatientState newObject() { return Context.getProgramWorkflowService().getPatientStateByUuid(getUuidProperty()); }