1   /*
2    * $Id: OracleJmsEndpointTestCase.java 7963 2007-08-21 08:53:15Z 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.oracle.jms;
12  
13  import org.mule.impl.endpoint.MuleEndpointURI;
14  import org.mule.tck.AbstractMuleTestCase;
15  import org.mule.umo.endpoint.UMOEndpointURI;
16  
17  public class OracleJmsEndpointTestCase extends AbstractMuleTestCase
18  {
19  
20      public void testWithoutPayloadFactory() throws Exception
21      {
22          UMOEndpointURI url = new MuleEndpointURI("jms://XML_QUEUE?transformers=XMLMessageToString");
23          assertNull(url.getParams().getProperty(OracleJmsConnector.PAYLOADFACTORY_PROPERTY));
24      }
25  
26      public void testWithPayloadFactory() throws Exception
27      {
28          UMOEndpointURI url = new MuleEndpointURI("jms://XML_QUEUE" + "?"
29                                                   + OracleJmsConnector.PAYLOADFACTORY_PROPERTY
30                                                   + "=oracle.xdb.XMLTypeFactory"
31                                                   + "&transformers=XMLMessageToString");
32          assertEquals("oracle.xdb.XMLTypeFactory", url.getParams().getProperty(
33              OracleJmsConnector.PAYLOADFACTORY_PROPERTY));
34      }
35  
36  }