View Javadoc

1   /*
2    * $Id: AjaxServletConnectorTestCase.java 19191 2010-08-25 21:05:23Z tcarlson $
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  package org.mule.transport.ajax;
11  
12  import org.mule.api.transport.Connector;
13  import org.mule.transport.AbstractConnectorTestCase;
14  import org.mule.transport.ajax.container.AjaxServletConnector;
15  
16  public class AjaxServletConnectorTestCase extends AbstractConnectorTestCase
17  {
18      public Connector createConnector() throws Exception
19      {
20          AjaxServletConnector c = new AjaxServletConnector(muleContext);
21          c.setName("test");
22          c.setInitialStateStopped(false);
23          return c;
24      }
25  
26      public Object getValidMessage() throws Exception
27      {
28          return "{\"value1\" : \"foo\", \"value2\" : \"bar\"}";
29      }
30  
31      public String getTestEndpointURI()
32      {
33          return "ajax-servlet:///service/request";
34      }
35  }