use of org.camunda.bpm.container.impl.metadata.spi.ProcessEngineXml in project camunda-bpm-platform by camunda.
the class BpmPlatformXmlParserTest method testParseProcessesXmlAntStyleProperties.
public void testParseProcessesXmlAntStyleProperties() {
BpmPlatformXml platformXml = parser.createParse().sourceUrl(getStreamUrl("bpmplatform_xml_ant_style_properties.xml")).execute().getBpmPlatformXml();
assertNotNull(platformXml);
ProcessEngineXml engineXml = platformXml.getProcessEngines().get(0);
assertEquals(1, engineXml.getPlugins().size());
ProcessEnginePluginXml pluginXml = engineXml.getPlugins().get(0);
Map<String, String> properties = pluginXml.getProperties();
assertEquals(2, properties.size());
// these two system properties are guaranteed to be set
assertEquals(System.getProperty("java.version"), properties.get("prop1"));
assertEquals("prefix-" + System.getProperty("os.name"), properties.get("prop2"));
}
use of org.camunda.bpm.container.impl.metadata.spi.ProcessEngineXml in project camunda-bpm-platform by camunda.
the class BpmPlatformXmlParserTest method testParseBpmPlatformXmlEnginePlugin.
public void testParseBpmPlatformXmlEnginePlugin() {
BpmPlatformXml bpmPlatformXml = parser.createParse().sourceUrl(getStreamUrl("bpmplatform_xml_engine_plugin.xml")).execute().getBpmPlatformXml();
assertNotNull(bpmPlatformXml);
assertEquals(1, bpmPlatformXml.getProcessEngines().size());
ProcessEngineXml engineXml = bpmPlatformXml.getProcessEngines().get(0);
assertEquals("engine1", engineXml.getName());
assertEquals("default", engineXml.getJobAcquisitionName());
List<ProcessEnginePluginXml> plugins = engineXml.getPlugins();
assertEquals(1, plugins.size());
ProcessEnginePluginXml plugin1 = plugins.get(0);
assertNotNull(plugin1);
assertEquals("org.camunda.bpm.MyAwesomePlugin", plugin1.getPluginClass());
Map<String, String> properties = plugin1.getProperties();
assertNotNull(properties);
assertEquals(2, properties.size());
String val1 = properties.get("prop1");
assertNotNull(val1);
assertEquals("val1", val1);
String val2 = properties.get("prop2");
assertNotNull(val2);
assertEquals("val2", val2);
}
Aggregations