Skip to content

Commit

Permalink
TRUNK-3098: Add unit-test getConceptsByAnswer_shouldFindAnswersForCon…
Browse files Browse the repository at this point in the history
…cept
  • Loading branch information
jeffblack360 authored and wluyima committed Mar 21, 2013
1 parent e60d95e commit 70ae7e3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion api/src/test/java/org/openmrs/api/ConceptServiceTest.java
Expand Up @@ -2065,7 +2065,19 @@ public void getConceptReferenceTerms_shouldReturnUniqueTermsWithACodeOrNameConta
for (ConceptReferenceTerm conceptReferenceTerm : matches)
Assert.assertTrue(uniqueTerms.add(conceptReferenceTerm));
}


/**
* @see ConceptService#getConceptsByAnswer(ConceptClass)
*/
@Test
public void getConceptsByAnswer_shouldFindAnswersForConcept() throws Exception {
Concept concept = conceptService.getConcept(7);
Assert.assertNotNull(concept);
List<Concept> concepts = conceptService.getConceptsByAnswer(concept);
Assert.assertEquals(1, concepts.size());
Assert.assertEquals(21, concepts.get(0).getId().intValue());
}

/**
* @see ConceptService#getConceptsByClass(ConceptClass)
* @verifies not fail due to no name in search
Expand Down

0 comments on commit 70ae7e3

Please sign in to comment.