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