use of org.eclipse.tracecompass.internal.tmf.analysis.xml.core.fsm.compile.TmfXmlActionCu in project tracecompass by tracecompass.
the class TmfXmlActionCuTest method testAction.
/**
* Test the compilation of a valid action strings
*
* @throws SAXException
* Exception thrown by parser
* @throws IOException
* Exception thrown by parser
* @throws ParserConfigurationException
* Exception thrown by parser
*/
@Test
public void testAction() throws SAXException, IOException, ParserConfigurationException {
AnalysisCompilationData data = new AnalysisCompilationData();
Element xmlElement = TmfXmlTestUtils.getXmlElement(TmfXmlStrings.ACTION, fExpected.getXmlString());
assertNotNull(xmlElement);
TmfXmlActionCu compiledAction = TmfXmlActionCu.compileNamedAction(data, xmlElement);
if (fExpected.getResult() == null) {
assertNull("Expected null action" + fExpected.getName(), compiledAction);
} else {
assertNotNull("Expected non null " + fExpected.getName(), compiledAction);
assertEquals(fExpected.getName() + " generated", fExpected.getResult(), compiledAction.generate());
}
}
Aggregations