1 package org.apidesign.bck2brwsr.dew;
3 import java.io.IOException;
4 import static org.testng.Assert.*;
5 import org.testng.annotations.Test;
9 * @author Jaroslav Tulach <jtulach@netbeans.org>
11 public class CompileTest {
12 @Test public void testCompile() throws IOException {
13 String html = "<html><body>"
14 + " <button id='btn'>Hello!</button>"
16 String java = "package x.y.z;"
17 + "import org.apidesign.bck2brwsr.htmlpage.api.*;"
18 + "@Page(xhtml=\"index.html\", className=\"Index\")"
20 + " @OnClick(id=\"btn\") static void clcs() {}"
22 Compile result = Compile.create(html, java);
24 assertNotNull(result.get("x/y/z/X.class"), "Class X is compiled: " + result);
25 assertNotNull(result.get("x/y/z/Index.class"), "Class Index is compiled: " + result);