1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/launcher/src/test/java/org/apidesign/bck2brwsr/dew/CompileTest.java Tue Jan 15 22:48:17 2013 +0100
1.3 @@ -0,0 +1,28 @@
1.4 +/*
1.5 + * To change this template, choose Tools | Templates
1.6 + * and open the template in the editor.
1.7 + */
1.8 +package org.apidesign.bck2brwsr.dew;
1.9 +
1.10 +import java.io.IOException;
1.11 +import java.util.Map;
1.12 +import static org.testng.Assert.*;
1.13 +import org.testng.annotations.Test;
1.14 +
1.15 +/**
1.16 + *
1.17 + * @author Jaroslav Tulach <jtulach@netbeans.org>
1.18 + */
1.19 +public class CompileTest {
1.20 + @Test public void testCompile() throws IOException {
1.21 + String html = "<html><body>"
1.22 + + " <button id='btn'>Hello!</button>"
1.23 + + "</body></html>";
1.24 + String java = "package x.y.z;"
1.25 + + "class X {"
1.26 + + "}";
1.27 + Map<String,byte[]> result = Compile.compile(html, java);
1.28 +
1.29 + assertNotNull(result.get("x/y/z/X.class"), "Class X is compiled: " + result);
1.30 + }
1.31 +}