View Javadoc

1   /*
2    * $Id: ComplexEndpointTestCase.java 22414 2011-07-14 13:24:46Z 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  
11  package org.mule.config.spring.parsers.endpoint;
12  
13  import org.mule.api.MuleException;
14  import org.mule.api.endpoint.ImmutableEndpoint;
15  
16  import org.junit.Test;
17  
18  import static org.junit.Assert.assertEquals;
19  import static org.junit.Assert.assertNotNull;
20  
21  public class ComplexEndpointTestCase extends AbstractEndpointTestCase
22  {
23  
24      @Override
25      protected String getConfigResources()
26      {
27          return "org/mule/config/spring/parsers/endpoint/complex-endpoint-test.xml";
28      }
29  
30      @Test
31      public void testComplex() throws MuleException
32      {
33          ImmutableEndpoint endpoint = doTest("complex");
34          assertNotNull(endpoint.getProperty("foo"));
35          assertEquals(endpoint.getProperty("foo"), "123");
36          assertNotNull(endpoint.getProperty("string"));
37          assertEquals(endpoint.getProperty("string"), "hello world");
38      }
39  
40  }