1   /*
2    * $Id: BpmConnectorTestCase.java 7968 2007-08-21 12:01:57Z holger $
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      /*
25       * (non-Javadoc)
26       * 
27       * @see org.mule.tck.providers.AbstractConnectorTestCase#getConnector()
28       */
29      public UMOConnector createConnector() throws Exception
30      {
31          ProcessConnector c = new ProcessConnector();
32          c.setName("ProcessConnector");
33  
34          // The BPMS must be set prior to initializing the connector.
35          Mock bpms = new Mock(BPMS.class);
36          bpms.expect("setMessageService", c);
37          c.setBpms((BPMS) bpms.proxy());
38          c.initialise();
39          bpms.verify();
40  
41          return c;
42      }
43  
44      /*
45       * (non-Javadoc)
46       * 
47       * @see org.mule.tck.providers.AbstractConnectorTestCase#getValidMessage()
48       */
49      public Object getValidMessage() throws Exception
50      {
51          return "test";
52      }
53  
54      /*
55       * (non-Javadoc)
56       * 
57       * @see org.mule.tck.providers.AbstractConnectorTestCase#getTestEndpointURI()
58       */
59      public String getTestEndpointURI()
60      {
61          return "bpm://dummyProcess?processId=1234";
62      }
63  
64  }