View Javadoc

1   /*
2    * $Id: MulticastNamespaceHandlerTestCase.java 22431 2011-07-18 07:40:35Z 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  package org.mule.transport.multicast;
11  
12  import org.mule.tck.junit4.FunctionalTestCase;
13  
14  import org.junit.Test;
15  
16  import static org.junit.Assert.assertEquals;
17  import static org.junit.Assert.assertNotNull;
18  import static org.junit.Assert.assertTrue;
19  
20  public class MulticastNamespaceHandlerTestCase extends FunctionalTestCase
21  {
22  
23      @Override
24      protected String getConfigResources()
25      {
26          return "multicast-namespace-config.xml";
27      }
28  
29      @Test
30      public void testConfig() throws Exception
31      {
32          MulticastConnector c = (MulticastConnector)muleContext.getRegistry().lookupConnector("multicastConnector");
33          assertNotNull(c);
34  
35          assertEquals(1234, c.getReceiveBufferSize());
36          assertEquals(2345, c.getTimeout());
37          assertEquals(3456, c.getSendBufferSize());
38          assertEquals(5678, c.getTimeToLive());
39          assertEquals(true, c.isBroadcast());
40          assertEquals(true, c.isLoopback());
41          assertEquals(false, c.isKeepSendSocketOpen());
42          assertTrue(c.isConnected());
43          assertTrue(c.isStarted());
44      }
45  
46  }