/** * @see FormatTag#printConcept(StringBuilder,Concept) * @verifies print the name with the correct name, and type */ @Test public void printConcept_shouldPrintTheNameWithTheCorrectLocaleNameAndType() throws Exception { ConceptService service = Context.getConceptService(); Locale locale = Context.getLocale(); ConceptNameTag tag = service.getConceptNameTag(5); ConceptNameTag anotherTag = service.getConceptNameTag(6); Context.flushSession(); Concept c = new Concept(); c.addName( buildName("English fully specified", locale, true, ConceptNameType.FULLY_SPECIFIED, null)); c.addName(buildName("English synonym", locale, false, null, null)); c.addName(buildName("English tag", locale, false, null, tag)); c.addName(buildName("English another tag", locale, false, null, anotherTag)); c.setDatatype(service.getConceptDatatype(1)); c.setConceptClass(service.getConceptClass(1)); Context.getConceptService().saveConcept(c); assertPrintConcept("English fully specified", c, null, null); assertPrintConcept( "English fully specified", c, ConceptNameType.FULLY_SPECIFIED.toString(), null); assertPrintConcept("English tag", c, null, tag.getTag()); }