use of com.github.javaparser.javadoc.description.JavadocDescription in project javaparser by javaparser.
the class JavadocTest method toCommentForEmptyJavadoc.
@Test
public void toCommentForEmptyJavadoc() {
Javadoc javadoc = new Javadoc(new JavadocDescription());
assertEquals(new JavadocComment("" + EOL + "\t\t "), javadoc.toComment("\t\t"));
}
use of com.github.javaparser.javadoc.description.JavadocDescription in project javaparser by javaparser.
the class JavadocTest method blockTagModificationWorks.
@Test
public void blockTagModificationWorks() {
Javadoc javadoc = new Javadoc(new JavadocDescription());
assertEquals(0, javadoc.getBlockTags().size());
JavadocBlockTag blockTag = new JavadocBlockTag(JavadocBlockTag.Type.RETURN, "a value");
javadoc.addBlockTag(blockTag);
assertEquals(1, javadoc.getBlockTags().size());
assertEquals(blockTag, javadoc.getBlockTags().get(0));
assertEquals(blockTag, javadoc.getBlockTags().remove(0));
assertEquals(0, javadoc.getBlockTags().size());
}
use of com.github.javaparser.javadoc.description.JavadocDescription in project javaparser by javaparser.
the class JavadocTest method descriptionModificationWorks.
@Test
public void descriptionModificationWorks() {
JavadocDescription description = new JavadocDescription();
assertEquals(0, description.getElements().size());
JavadocDescriptionElement inlineTag = new JavadocInlineTag("inheritDoc", JavadocInlineTag.Type.INHERIT_DOC, "");
assertTrue(description.addElement(inlineTag));
assertEquals(1, description.getElements().size());
assertEquals(inlineTag, description.getElements().get(0));
assertEquals(inlineTag, description.getElements().remove(0));
assertEquals(0, description.getElements().size());
}
use of com.github.javaparser.javadoc.description.JavadocDescription in project javaparser by javaparser.
the class JavadocTest method toTextForEmptyJavadoc.
@Test
public void toTextForEmptyJavadoc() {
Javadoc javadoc = new Javadoc(new JavadocDescription());
assertEquals("", javadoc.toText());
}
Aggregations