Search in sources :

Example 1 with JavadocInlineTag

use of com.github.javaparser.javadoc.description.JavadocInlineTag 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());
}
Also used : JavadocDescriptionElement(com.github.javaparser.javadoc.description.JavadocDescriptionElement) JavadocInlineTag(com.github.javaparser.javadoc.description.JavadocInlineTag) JavadocDescription(com.github.javaparser.javadoc.description.JavadocDescription) Test(org.junit.Test)

Aggregations

JavadocDescription (com.github.javaparser.javadoc.description.JavadocDescription)1 JavadocDescriptionElement (com.github.javaparser.javadoc.description.JavadocDescriptionElement)1 JavadocInlineTag (com.github.javaparser.javadoc.description.JavadocInlineTag)1 Test (org.junit.Test)1