use of org.camunda.bpm.application.impl.metadata.spi.ProcessesXml in project camunda-bpm-platform by camunda.
the class ProcessesXmlParserTest method testParseProcessesXmlTwoArchives.
public void testParseProcessesXmlTwoArchives() {
ProcessesXml processesXml = parser.createParse().sourceUrl(getStreamUrl("process_xml_two_archives.xml")).execute().getProcessesXml();
assertNotNull(processesXml);
assertEquals(0, processesXml.getProcessEngines().size());
assertEquals(2, processesXml.getProcessArchives().size());
ProcessArchiveXml archiveXml1 = processesXml.getProcessArchives().get(0);
assertEquals("pa1", archiveXml1.getName());
assertEquals("default", archiveXml1.getProcessEngineName());
List<String> resourceNames = archiveXml1.getProcessResourceNames();
assertEquals(2, resourceNames.size());
assertEquals("process1.bpmn", resourceNames.get(0));
assertEquals("process2.bpmn", resourceNames.get(1));
Map<String, String> properties1 = archiveXml1.getProperties();
assertNotNull(properties1);
assertEquals(2, properties1.size());
assertEquals("value1", properties1.get("prop1"));
assertEquals("value2", properties1.get("prop2"));
ProcessArchiveXml archiveXml2 = processesXml.getProcessArchives().get(1);
assertEquals("pa2", archiveXml2.getName());
assertEquals("default", archiveXml2.getProcessEngineName());
List<String> resourceNames2 = archiveXml2.getProcessResourceNames();
assertEquals(2, resourceNames.size());
assertEquals("process1.bpmn", resourceNames2.get(0));
assertEquals("process2.bpmn", resourceNames2.get(1));
Map<String, String> properties2 = archiveXml2.getProperties();
assertNotNull(properties2);
assertEquals(0, properties2.size());
}
use of org.camunda.bpm.application.impl.metadata.spi.ProcessesXml in project camunda-bpm-platform by camunda.
the class ProcessesXmlParserTest method testParseProcessesXmlNsPrefix.
public void testParseProcessesXmlNsPrefix() {
ProcessesXml processesXml = parser.createParse().sourceUrl(getStreamUrl("process_xml_ns_prefix.xml")).execute().getProcessesXml();
assertNotNull(processesXml);
assertEquals(1, processesXml.getProcessEngines().size());
assertEquals(1, processesXml.getProcessArchives().size());
}
use of org.camunda.bpm.application.impl.metadata.spi.ProcessesXml in project camunda-bpm-platform by camunda.
the class ProcessesXmlParserTest method FAILING_testParseProcessesXmlClassLineBreak.
public void FAILING_testParseProcessesXmlClassLineBreak() {
ProcessesXml processesXml = parser.createParse().sourceUrl(getStreamUrl("process_xml_one_archive_with_line_break.xml")).execute().getProcessesXml();
assertNotNull(processesXml);
ProcessArchiveXml archiveXml1 = processesXml.getProcessArchives().get(0);
List<String> resourceNames = archiveXml1.getProcessResourceNames();
assertEquals(2, resourceNames.size());
assertEquals("process1.bpmn", resourceNames.get(0));
}
use of org.camunda.bpm.application.impl.metadata.spi.ProcessesXml in project camunda-bpm-platform by camunda.
the class ProcessesXmlParserTest method testParseProcessesXmlTwoEngines.
public void testParseProcessesXmlTwoEngines() {
ProcessesXml processesXml = parser.createParse().sourceUrl(getStreamUrl("process_xml_two_engines.xml")).execute().getProcessesXml();
assertNotNull(processesXml);
assertEquals(2, processesXml.getProcessEngines().size());
assertEquals(0, processesXml.getProcessArchives().size());
ProcessEngineXml engineXml1 = processesXml.getProcessEngines().get(0);
assertEquals("engine1", engineXml1.getName());
assertEquals("configuration", engineXml1.getConfigurationClass());
assertEquals("datasource", engineXml1.getDatasource());
Map<String, String> properties1 = engineXml1.getProperties();
assertNotNull(properties1);
assertEquals(2, properties1.size());
assertEquals("value1", properties1.get("prop1"));
assertEquals("value2", properties1.get("prop2"));
ProcessEngineXml engineXml2 = processesXml.getProcessEngines().get(1);
assertEquals("engine2", engineXml2.getName());
assertEquals("configuration", engineXml2.getConfigurationClass());
assertEquals("datasource", engineXml2.getDatasource());
// the second engine has no properties
Map<String, String> properties2 = engineXml2.getProperties();
assertNotNull(properties2);
assertEquals(0, properties2.size());
}
Aggregations