/** * @see FormService#getFormFieldByUuid(String) */ @Test public void getFormFieldByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid() { Assert.assertNull(Context.getFormService().getFormFieldByUuid("some invalid uuid")); }
/** * @see FormService#getFormFieldByUuid(String) */ @Test public void getFormFieldByUuid_shouldFindObjectGivenValidUuid() { String uuid = "1c822b7b-7840-463d-ba70-e0c8338a4c2d"; FormField formField = Context.getFormService().getFormFieldByUuid(uuid); assertEquals(2, (int) formField.getFormFieldId()); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getByUniqueId(java.lang.String) */ @Override public FormField getByUniqueId(String uniqueId) { return Context.getFormService().getFormFieldByUuid(uniqueId); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResourceTest#newObject() */ @Override public FormField newObject() { return Context.getFormService().getFormFieldByUuid(getUuidProperty()); }