1   /*
2    * $Id
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.providers.bpm;
12  
13  import org.mule.tck.providers.AbstractConnectorTestCase;
14  import org.mule.umo.provider.UMOConnector;
15  
16  import com.mockobjects.dynamic.Mock;
17  
18  /**
19   * Generic connector tests.
20   */
21  public class BpmConnectorTestCase extends AbstractConnectorTestCase {
22  
23      /*
24       * (non-Javadoc)
25       *
26       * @see org.mule.tck.providers.AbstractConnectorTestCase#getConnector()
27       */
28      public UMOConnector getConnector() throws Exception {
29          ProcessConnector c = new ProcessConnector();
30          c.setName("ProcessConnector");
31  
32          // The BPMS must be set prior to initializing the connector.
33          Mock bpms = new Mock(BPMS.class);
34          bpms.expect("setMessageService", c);
35          c.setBpms((BPMS) bpms.proxy());
36          c.initialise();
37          bpms.verify();
38  
39          return c;
40      }
41  
42      /*
43       * (non-Javadoc)
44       *
45       * @see org.mule.tck.providers.AbstractConnectorTestCase#getValidMessage()
46       */
47      public Object getValidMessage() throws Exception {
48          return "test";
49      }
50  
51      /*
52       * (non-Javadoc)
53       *
54       * @see org.mule.tck.providers.AbstractConnectorTestCase#getTestEndpointURI()
55       */
56      public String getTestEndpointURI() {
57          return "bpm://dummyProcess?processId=1234";
58      }
59  }