View Javadoc

1   /*
2    * $Id: HttpMultipleCookiesInEndpointTestCase.java 20320 2010-11-24 15:03:31Z dfeist $
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.transport.http.functional;
12  
13  import org.mule.api.MuleMessage;
14  import org.mule.module.client.MuleClient;
15  import org.mule.tck.DynamicPortTestCase;
16  
17  public class HttpMultipleCookiesInEndpointTestCase extends DynamicPortTestCase
18  {
19  
20      @Override
21      protected String getConfigResources()
22      {
23  
24          return "http-multiple-cookies-on-endpoint-test.xml";
25      }
26  
27      public void testThatThe2CookiesAreSentAndReceivedByTheComponent() throws Exception
28      {
29          MuleClient client = new MuleClient(muleContext);
30          MuleMessage response = client.send("vm://in", "HELLO", null);
31          assertNotNull(response);
32          assertNotNull(response.getPayload());
33          assertEquals("Both Cookies Found!", response.getPayloadAsString());
34      }
35  
36      @Override
37      protected int getNumPortsToFind()
38      {
39          return 1;
40      }
41  
42  }
43  
44