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.module.xml.functional;
8   
9   import java.util.Properties;
10  
11  
12  public class JXPathPropertyExtractorMultipleEndpointsTestCase extends AbstractXmlPropertyExtractorTestCase
13  {
14  
15      public JXPathPropertyExtractorMultipleEndpointsTestCase()
16      {
17          super(true);
18      }
19  
20      @Override
21      protected Properties getStartUpProperties()
22      {
23          Properties p = new Properties();
24          p.setProperty("selector.expression", "/endpoints/endpoint");
25          p.setProperty("selector.evaluator", "jxpath");
26  
27          return p;
28      }
29  
30      @Override
31      protected Object getMatchMessage()
32      {
33          return "<endpoints><endpoint>matchingEndpoint1</endpoint><endpoint>matchingEndpoint2</endpoint></endpoints>";
34      }
35  
36      @Override
37      protected Object getErrorMessage()
38      {
39          return "<endpoint>missingEndpoint</endpoint>";
40      }
41  
42  }