Package org.mule.module.xml.functional

Source Code of org.mule.module.xml.functional.Dom4jPropertyExtractorMultipleEndpointsTestCase

/*
* $Id: Dom4jPropertyExtractorMultipleEndpointsTestCase.java 20321 2010-11-24 15:21:24Z dfeist $
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/

package org.mule.module.xml.functional;

import java.util.Properties;

import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;

public class Dom4jPropertyExtractorMultipleEndpointsTestCase extends AbstractXmlPropertyExtractorTestCase
{

    public Dom4jPropertyExtractorMultipleEndpointsTestCase()
    {
        super(false);
    }

    protected Properties getStartUpProperties()
    {
        Properties p = new Properties();
        p.setProperty("selector.expression", "/endpoints/endpoint");
        p.setProperty("selector.evaluator", "xpath");

        return p;
    }

    protected Object getMatchMessage()
    {
        Document document = DocumentHelper.createDocument();
        Element e = document.addElement("endpoints");
        e.addElement("endpoint").addText("matchingEndpoint1");
        e.addElement("endpoint").addText("matchingEndpoint2");
        return document;
    }

    protected Object getErrorMessage()
    {
        Document document = DocumentHelper.createDocument();
        document.addElement("endpoint").addText("missingEndpoint");
        return document;
    }

}
TOP

Related Classes of org.mule.module.xml.functional.Dom4jPropertyExtractorMultipleEndpointsTestCase

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.