use of org.eclipse.n4js.jsdoc.tags.AbstractLineTagDefinition in project n4js by eclipse.
the class DocletParserTest method testTrailingDescriptionIsIgnored.
@SuppressWarnings("javadoc")
@Test
public void testTrailingDescriptionIsIgnored() {
String in = "/** This is the description.\n * @stubLineTagTitle \n * Trailing description.\n */";
AbstractLineTagDefinition tag = new StubLineTagDefinition("stubLineTagTitle");
DocletParser docletParser = new DocletParser(new TagDictionary<>(Arrays.asList(tag)), new TagDictionary<AbstractInlineTagDefinition>());
Doclet doclet = docletParser.parse(in);
assertEquals(1, doclet.getContents().size());
assertEquals(1, doclet.getContents().size());
Text descr = (Text) doclet.getContents().get(0);
assertEquals("This is the description.", descr.getText());
LineTag lineTag = doclet.getLineTags().get(0);
assertEquals("stubLineTagTitle", lineTag.getTitle().getTitle());
}
use of org.eclipse.n4js.jsdoc.tags.AbstractLineTagDefinition in project n4js by eclipse.
the class DocletParserTest method testJSDocParsingWithoutMainDescription.
@SuppressWarnings("javadoc")
@Test
public void testJSDocParsingWithoutMainDescription() {
String in = "/** \n * @stubLineTagTitle \n */";
AbstractLineTagDefinition tag = new StubLineTagDefinition("stubLineTagTitle");
DocletParser docletParser = new DocletParser(new TagDictionary<>(Arrays.asList(tag)), new TagDictionary<AbstractInlineTagDefinition>());
Doclet doclet = docletParser.parse(in);
LineTag lineTag = doclet.getLineTags().get(0);
assertEquals("stubLineTagTitle", lineTag.getTitle().getTitle());
}
use of org.eclipse.n4js.jsdoc.tags.AbstractLineTagDefinition in project n4js by eclipse.
the class DocletParserTest method testUnkonwLineTagIsIgnored.
@SuppressWarnings("javadoc")
@Test
public void testUnkonwLineTagIsIgnored() {
String in = "/** \n * @unkonwTagTitle \n */";
AbstractLineTagDefinition tag = new StubLineTagDefinition("stubLineTagTitle");
DocletParser docletParser = new DocletParser(new TagDictionary<>(Arrays.asList(tag)), new TagDictionary<AbstractInlineTagDefinition>());
Doclet doclet = docletParser.parse(in);
assertEquals(0, doclet.getLineTags().size());
}
Aggregations