use of org.ballerinalang.docgen.model.GlobalVariableDoc in project ballerina by ballerina-lang.
the class HtmlDocTest method testGlobalVariablePropertiesExtracted.
@Test(description = "Global variables should be available via construct")
public void testGlobalVariablePropertiesExtracted() throws Exception {
BLangPackage bLangPackage = createPackage("package x.y; " + "@Description { value:\"The Read Append access mode\"}\n" + "public const string RA = \"RA\";");
GlobalVariableDoc globalVariableDoc = Generator.createDocForNode(bLangPackage.getGlobalVariables().get(0));
Assert.assertEquals(globalVariableDoc.name, "RA", "Global variable name should be extracted");
Assert.assertEquals(globalVariableDoc.dataType, "string", "Global variable type should be extracted");
Assert.assertEquals(globalVariableDoc.description, "The Read Append access mode", "Description of the " + "global variable should be extracted");
}
Aggregations