View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.config.spring.parsers.endpoint;
8   
9   import org.mule.api.MuleException;
10  import org.mule.api.endpoint.ImmutableEndpoint;
11  
12  import org.junit.Test;
13  
14  import static org.junit.Assert.assertEquals;
15  import static org.junit.Assert.assertNotNull;
16  
17  public class ComplexEndpointTestCase extends AbstractEndpointTestCase
18  {
19  
20      @Override
21      protected String getConfigResources()
22      {
23          return "org/mule/config/spring/parsers/endpoint/complex-endpoint-test.xml";
24      }
25  
26      @Test
27      public void testComplex() throws MuleException
28      {
29          ImmutableEndpoint endpoint = doTest("complex");
30          assertNotNull(endpoint.getProperty("foo"));
31          assertEquals(endpoint.getProperty("foo"), "123");
32          assertNotNull(endpoint.getProperty("string"));
33          assertEquals(endpoint.getProperty("string"), "hello world");
34      }
35  
36  }