View Javadoc

1   /*
2    * $Id: StaxFeatureTestCase.java 22450 2011-07-19 08:20:41Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.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.module.cxf;
12  
13  import org.mule.tck.junit4.FunctionalTestCase;
14  import org.mule.tck.junit4.rule.DynamicPort;
15  
16  import org.apache.cxf.Bus;
17  import org.junit.Rule;
18  import org.junit.Test;
19  
20  import static org.junit.Assert.assertNotNull;
21  
22  public class StaxFeatureTestCase extends FunctionalTestCase
23  {
24  
25      @Rule
26      public DynamicPort dynamicPort = new DynamicPort("port1");
27  
28      @Override
29      protected String getConfigResources()
30      {
31          return "stax-feature-conf.xml";
32      }
33  
34      @Test
35      public void testEchoService() throws Exception
36      {
37          CxfConfiguration cxfCon = (CxfConfiguration)muleContext.getRegistry().lookupObject(CxfConstants.DEFAULT_CXF_CONFIGURATION);
38          assertNotNull(cxfCon);
39  
40          Bus cxfBus = cxfCon.getCxfBus();
41  
42          // ensure that our interceptor is there
43  //        assertEquals(2, cxfBus.getInInterceptors().size());
44  //
45  //        MuleClient client = new MuleClient();
46  //        MuleMessage result = client.send("cxf:http://localhost:63081/services/Echo?method=echo", "Hello!", null);
47  //        assertEquals("Hello!", result.getPayload());
48      }
49  
50  }
51