View Javadoc

1   /*
2    * $Id: JdbcEndpointSessionPropertiesEe2323TestCase.java 22697 2011-08-18 05:21:25Z 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.transport.jdbc.functional;
12  
13  import org.hamcrest.core.IsNull;
14  import org.junit.Test;
15  import org.junit.runners.Parameterized;
16  import org.mule.DefaultMuleMessage;
17  import org.mule.api.MuleMessage;
18  import org.mule.module.client.MuleClient;
19  
20  import java.util.Arrays;
21  import java.util.Collection;
22  
23  import static org.junit.Assert.assertThat;
24  
25  public class JdbcEndpointSessionPropertiesEe2323TestCase extends AbstractJdbcFunctionalTestCase
26  {
27  
28      public JdbcEndpointSessionPropertiesEe2323TestCase(ConfigVariant variant, String configResources)
29      {
30          super(variant, configResources);
31      }
32  
33      @Parameterized.Parameters
34      public static Collection<Object[]> parameters()
35      {
36          return Arrays.asList(new Object[][]{
37                  {ConfigVariant.FLOW, AbstractJdbcFunctionalTestCase.getConfig() + ",jdbc-endpoint-session-properties.xml"}
38          });
39      }
40  
41      @Test
42      public void testSelectOnOutbound() throws Exception
43      {
44          MuleClient client = new MuleClient(muleContext);
45          MuleMessage response = client.send("vm://Flow1s1", new DefaultMuleMessage(new Object(), muleContext));
46          assertThat(response, IsNull.<Object>notNullValue());
47          assertThat(response.getExceptionPayload(), IsNull.<Object>nullValue());
48      }
49  
50  }