View Javadoc

1   /*
2    * $Id: ReuseMule2069TestCase.java 22464 2011-07-20 08:24:45Z justin.calleja $
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.tcp.issues;
12  
13  import org.mule.transport.tcp.TcpConnector;
14  import org.mule.transport.tcp.TcpFunctionalTestCase;
15  
16  import java.util.Arrays;
17  import java.util.Collection;
18  
19  import org.junit.Test;
20  import org.junit.runners.Parameterized.Parameters;
21  
22  import static org.junit.Assert.assertTrue;
23  
24  /**
25   * This is just to check that the Boolean (rather than boolean) doesn't cause any problems
26   */
27  public class ReuseMule2069TestCase extends TcpFunctionalTestCase
28  {
29      public ReuseMule2069TestCase(ConfigVariant variant, String configResources)
30      {
31          super(variant, configResources);
32      }
33      
34      @Parameters
35      public static Collection<Object[]> parameters()
36      {
37          return Arrays.asList(new Object[][]{
38              {ConfigVariant.SERVICE, "reuse-mule-2069-service.xml"},
39              {ConfigVariant.FLOW, "reuse-mule-2069-flow.xml"}
40          });
41      }
42  
43      @Test
44      public void testReuseSetOnConnector()
45      {
46          assertTrue(((TcpConnector) muleContext.getRegistry().lookupConnector(TcpConnector.TCP)).isReuseAddress().booleanValue());
47      }
48  
49  }