nz.ac.auckland.integration.testing.resource.PlainTextTestResource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of soaunit Show documentation
Show all versions of soaunit Show documentation
Orchestrated Testing of SOA Artifacts Using Apache Camel
The newest version!
package nz.ac.auckland.integration.testing.resource;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.net.URL;
/**
* A simple mechanism for sending and comparing plain text values
* using the Java equals mechanism
*
* @author David MacDonald
*/
public class PlainTextTestResource extends StaticTestResource {
public PlainTextTestResource(String value) {
super(value);
}
public PlainTextTestResource(File file) {
super(file);
}
public PlainTextTestResource(URL url) {
super(url);
}
/**
* @return The plain text from an external resource as a standard Java String
* @throws Exception
*/
protected String getResource(File file) throws Exception {
return FileUtils.readFileToString(file);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy