use of org.wso2.carbon.apimgt.core.api.Analyzer in project carbon-apimgt by wso2.
the class XMLAnalyzerTestCase method testConfigureAnalyzer.
@Test
public void testConfigureAnalyzer() throws Exception {
init();
XMLAnalyzer analyzer = new XMLAnalyzer();
analyzer.configure(xmlConfig);
}
use of org.wso2.carbon.apimgt.core.api.Analyzer in project carbon-apimgt by wso2.
the class XMLAnalyzerTestCase method testMaxChildrenPerElement.
@Test(expectedExceptions = APIMThreatAnalyzerException.class)
public void testMaxChildrenPerElement() throws Exception {
init();
xmlConfig.setMaxChildrenPerElement(2);
XMLAnalyzer analyzer = new XMLAnalyzer();
analyzer.configure(xmlConfig);
String xmlString = "<root><c1></c1><c2></c2><c3></c3></root>";
analyzer.analyze(xmlString, "/foo");
}
Aggregations