1.1 --- a/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/Bck2BrwsrCase.java Thu Jan 31 16:58:27 2013 +0100
1.2 +++ b/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/Bck2BrwsrCase.java Thu Jan 31 17:39:47 2013 +0100
1.3 @@ -25,6 +25,8 @@
1.4 import java.lang.reflect.Method;
1.5 import org.apidesign.bck2brwsr.launcher.Launcher;
1.6 import org.apidesign.bck2brwsr.launcher.InvocationContext;
1.7 +import org.apidesign.bck2brwsr.vmtest.HtmlFragment;
1.8 +import org.apidesign.bck2brwsr.vmtest.HttpResource;
1.9 import org.testng.ITest;
1.10 import org.testng.annotations.Test;
1.11
1.12 @@ -37,15 +39,17 @@
1.13 private final Launcher l;
1.14 private final String type;
1.15 private final boolean fail;
1.16 + private final HtmlFragment html;
1.17 + private final HttpResource http;
1.18 Object value;
1.19 - private final String html;
1.20
1.21 - Bck2BrwsrCase(Method m, String type, Launcher l, boolean fail, String html) {
1.22 + Bck2BrwsrCase(Method m, String type, Launcher l, boolean fail, HtmlFragment html, HttpResource http) {
1.23 this.l = l;
1.24 this.m = m;
1.25 this.type = type;
1.26 this.fail = fail;
1.27 this.html = html;
1.28 + this.http = http;
1.29 }
1.30
1.31 @Test(groups = "run")
1.32 @@ -53,7 +57,10 @@
1.33 if (l != null) {
1.34 InvocationContext c = l.createInvocation(m.getDeclaringClass(), m.getName());
1.35 if (html != null) {
1.36 - c.setHtmlFragment(html);
1.37 + c.setHtmlFragment(html.value());
1.38 + }
1.39 + if (http != null) {
1.40 + c.setHttpResource(http.path(), http.mimeType(), http.content());
1.41 }
1.42 String res = c.invoke();
1.43 value = res;