use of org.eclipse.n4js.jsdoc.DocletParser in project n4js by eclipse.
the class LineTagTest method testLineTagWithRegion.
@SuppressWarnings("javadoc")
@Test
public void testLineTagWithRegion() {
String in = "/** foo.\n * @stubLineTagTitle {@region value} \n */";
AbstractLineTagDefinition tag = new StubLineTagWithRegionDefinition("stubLineTagTitle");
DocletParser docletParser = new DocletParser(new TagDictionary<>(Arrays.asList(tag)), new TagDictionary<AbstractInlineTagDefinition>());
Doclet doclet = docletParser.parse(in);
LineTag lineTag = doclet.getLineTags().get(0);
TagValue region = lineTag.getValueByKey(StubLineTagWithRegionDefinition.REGION);
Text strcturedText = (Text) region.getContents().get(0);
assertEquals("@region value", strcturedText.getText());
}
Aggregations