/** * @see FormService#getFieldTypeByUuid(String) */ @Test public void getFieldTypeByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid() { Assert.assertNull(Context.getFormService().getFieldTypeByUuid("some invalid uuid")); }
/** * @see FormService#getFieldTypeByUuid(String) */ @Test public void getFieldTypeByUuid_shouldFindObjectGivenValidUuid() { String uuid = "e7016b7d-39a5-4911-89da-0eefbfef7cb5"; FieldType fieldType = Context.getFormService().getFieldTypeByUuid(uuid); assertEquals(2, (int) fieldType.getFieldTypeId()); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getByUniqueId(java.lang.String) */ @Override public FieldType getByUniqueId(String uniqueId) { return Context.getFormService().getFieldTypeByUuid(uniqueId); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResourceTest#newObject() */ @Override public FieldType newObject() { return Context.getFormService().getFieldTypeByUuid(getUuidProperty()); }