
org.xillium.play.jsoh.JsohServer Maven / Gradle / Ivy
package org.xillium.play.jsoh;
import java.io.*;
import java.net.*;
import java.util.*;
import java.text.ParseException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.databind.type.MapType;
import com.fasterxml.jackson.databind.type.SimpleType;
import org.xillium.play.TestFailureException;
import org.xillium.play.TestSuite;
import org.xillium.play.TestTarget;
public class JsohServer implements TestTarget {
//private static final SimpleDateFormat DATE_PARSER = new SimpleDateFormat("MM/dd/yy");
public class Request implements TestTarget.Request {
public final Map binder = new HashMap();
public Request set(String key, String value) throws IOException, ParseException {
if (key.startsWith("bool:")) {
binder.put(key.substring(5), value);
} else if (key.startsWith("date:")) {
binder.put(key.substring(5), value);
} else if (key.startsWith("file:")) {
//binder.put(key.substring(5), new TransferFile(new File(value), "application/octet-stream"));
} else {
binder.put(key, value);
}
return this;
}
}
public class Response implements TestTarget.Response {
public final List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy