1   /*
2    * $Id: JdbcConnectorTestCase.java 8513 2007-09-20 12:31:31Z dirk.olmes $
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.jdbc;
12  
13  import org.mule.tck.providers.AbstractConnectorTestCase;
14  import org.mule.umo.provider.UMOConnector;
15  
16  import java.util.HashMap;
17  import java.util.Map;
18  
19  import org.apache.derby.jdbc.EmbeddedDataSource;
20  
21  public class JdbcConnectorTestCase extends AbstractConnectorTestCase
22  {
23      // @Override
24      public UMOConnector createConnector() throws Exception
25      {
26          JdbcConnector c = new JdbcConnector();
27          EmbeddedDataSource embeddedDS = new EmbeddedDataSource();
28          embeddedDS.setDatabaseName("embeddedDB");
29          c.setName("JdbcConnector");
30          c.setDataSource(embeddedDS);
31          c.setPollingFrequency(1000);
32          c.initialise();
33          return c;
34      }
35  
36      public Object getValidMessage() throws Exception
37      {
38          Map map = new HashMap();
39          return map;
40      }
41  
42      public String getTestEndpointURI()
43      {
44          return "jdbc://test?sql=SELECT * FROM TABLE";
45      }
46  }