use of org.openmrs.ConceptReferenceTerm in project openmrs-core by openmrs.
the class ConceptServiceTest method retireConceptReferenceTerm_shouldShouldSetTheDefaultRetireReasonIfNoneIsGiven.
/**
* @see ConceptService#retireConceptReferenceTerm(ConceptReferenceTerm,String)
*/
@Test
public void retireConceptReferenceTerm_shouldShouldSetTheDefaultRetireReasonIfNoneIsGiven() {
ConceptReferenceTerm term = Context.getConceptService().getConceptReferenceTerm(1);
term = Context.getConceptService().retireConceptReferenceTerm(term, null);
Assert.assertNotNull(term.getRetireReason());
}
use of org.openmrs.ConceptReferenceTerm in project openmrs-core by openmrs.
the class ConceptServiceTest method getConceptReferenceTermByCode_shouldReturnAConceptReferenceTermThatMatchesTheGivenCodeFromTheGivenSource.
/**
* @see ConceptService#getConceptReferenceTermByCode(String,ConceptSource)
*/
@Test
public void getConceptReferenceTermByCode_shouldReturnAConceptReferenceTermThatMatchesTheGivenCodeFromTheGivenSource() {
ConceptReferenceTerm term = Context.getConceptService().getConceptReferenceTermByCode("2332523", new ConceptSource(2));
Assert.assertNotNull(term);
Assert.assertEquals("2332523", term.getCode());
}
Aggregations