/** * @see ConceptServiceImpl#getSetsContainingConcept(Concept) */ @Test public void getSetsContainingConcept_shouldGiveAnEmptyListIfConceptIdIsNull() { List<ConceptSet> conceptSets = conceptService.getSetsContainingConcept(new Concept()); assertEquals(conceptSets, Collections.emptyList()); }
/** * @see ConceptServiceImpl#getSetsContainingConcept(Concept) */ @Test public void getSetsContainingConcept_shouldGiveAnEmptyListIfNoMatchingConceptSetIsFound() { String uuid = "0cbe2ed3-cd5f-4f46-9459-26127c9265ab"; Concept concept = conceptService.getConceptByUuid(uuid); List<ConceptSet> conceptSets = conceptService.getSetsContainingConcept(concept); assertEquals(conceptSets, Collections.emptyList()); }
/** * @see ConceptServiceImpl#getSetsContainingConcept(Concept) */ @Test public void getSetsContainingConcept_shouldGiveAListOfConceptSetContainingTheGivenConcept() { Concept concept = conceptService.getConcept(18); List<ConceptSet> conceptSets = conceptService.getSetsContainingConcept(concept); assertNotNull(conceptSets); assertEquals(conceptSets.get(0).getConcept(), concept); }