use of org.wso2.carbon.registry.core.Tag in project ballerina by ballerina-lang.
the class DocumentationTest method testNestedInlineDeprecated.
@Test(description = "Test doc nested inline inside deprecated tag.")
public void testNestedInlineDeprecated() {
CompileResult compileResult = BCompileUtil.compile("test-src/documentation/nested_inline_deprecated.bal");
Assert.assertEquals(0, compileResult.getWarnCount());
PackageNode packageNode = compileResult.getAST();
BLangVariable constant = (BLangVariable) packageNode.getGlobalVariables().get(0);
List<BLangDeprecatedNode> docNodes = constant.deprecatedAttachments;
BLangDeprecatedNode dNode = docNodes.get(0);
Assert.assertNotNull(dNode);
Assert.assertEquals(dNode.documentationText, "\n" + " Example of a string templates:\n" + " ``` This starts ends triple backtick ``string s = string `hello {{name}}`;`` " + "ends triple backtick```\n" + "\n" + " Example for an xml literal:\n" + " ``xml x = xml `<{{tagName}}>hello</{{tagName}}>`;``\n");
}
Aggregations