1
2
3
4
5
6
7
8
9
10
11 package org.mule.examples.loanbroker.bpm;
12
13 import org.mule.MuleManager;
14 import org.mule.config.ConfigurationBuilder;
15 import org.mule.config.ConfigurationException;
16 import org.mule.config.i18n.MessageFactory;
17 import org.mule.examples.loanbroker.tests.AbstractAsynchronousLoanBrokerTestCase;
18 import org.mule.extras.spring.config.SpringConfigurationBuilder;
19 import org.mule.providers.bpm.BPMS;
20 import org.mule.providers.bpm.ProcessConnector;
21 import org.mule.providers.jdbc.util.MuleDerbyUtils;
22
23
24 public class JBpmFunctionalTestCase extends AbstractAsynchronousLoanBrokerTestCase
25 {
26
27 public static final long PROCESS_ID = 1;
28
29 protected void suitePreSetUp() throws Exception
30 {
31
32
33
34 MuleDerbyUtils.defaultDerbyCleanAndInit("derby.properties", "database.name");
35
36 super.suitePreSetUp();
37 }
38
39 protected ConfigurationBuilder getBuilder() throws Exception
40 {
41 return new SpringConfigurationBuilder();
42 }
43
44
45 protected String getConfigResources()
46 {
47 return "loan-broker-bpm-mule-config.xml";
48 }
49
50
51 public void testSingleLoanRequest() throws Exception
52 {
53 super.testSingleLoanRequest();
54
55 ProcessConnector connector =
56 (ProcessConnector) MuleManager.getInstance().lookupConnector("jBpmConnector");
57 if (connector == null)
58 {
59 throw new ConfigurationException(MessageFactory.createStaticMessage("Unable to look up jBpmConnector from Mule registry."));
60 }
61 BPMS bpms = connector.getBpms();
62
63
64
65
66 }
67
68 public void testLotsOfLoanRequests() throws Exception
69 {
70 super.testLotsOfLoanRequests();
71
72
73
74
75 Thread.sleep(100);
76 }
77 }