com.github.dreamhead.moco.extractor.XmlExtractorHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of moco-core Show documentation
Show all versions of moco-core Show documentation
Moco is an easy setup stub framework, mainly focusing on testing and integration.
package com.github.dreamhead.moco.extractor;
import com.github.dreamhead.moco.Request;
import com.github.dreamhead.moco.RequestExtractor;
import org.xml.sax.InputSource;
import java.io.StringReader;
public class XmlExtractorHelper {
public InputSource extractAsInputSource(final Request request, final RequestExtractor extractor) {
return new InputSource(new StringReader(extractor.extract(request).get()));
}
}