author | Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
Tue, 15 Jan 2013 22:48:17 +0100 | |
branch | dew |
changeset 462 | aa69b1387624 |
child 463 | 3641fd0663d3 |
permissions | -rw-r--r-- |
jaroslav@462 | 1 |
/* |
jaroslav@462 | 2 |
* To change this template, choose Tools | Templates |
jaroslav@462 | 3 |
* and open the template in the editor. |
jaroslav@462 | 4 |
*/ |
jaroslav@462 | 5 |
package org.apidesign.bck2brwsr.dew; |
jaroslav@462 | 6 |
|
jaroslav@462 | 7 |
import java.io.IOException; |
jaroslav@462 | 8 |
import java.util.Map; |
jaroslav@462 | 9 |
import static org.testng.Assert.*; |
jaroslav@462 | 10 |
import org.testng.annotations.Test; |
jaroslav@462 | 11 |
|
jaroslav@462 | 12 |
/** |
jaroslav@462 | 13 |
* |
jaroslav@462 | 14 |
* @author Jaroslav Tulach <jtulach@netbeans.org> |
jaroslav@462 | 15 |
*/ |
jaroslav@462 | 16 |
public class CompileTest { |
jaroslav@462 | 17 |
@Test public void testCompile() throws IOException { |
jaroslav@462 | 18 |
String html = "<html><body>" |
jaroslav@462 | 19 |
+ " <button id='btn'>Hello!</button>" |
jaroslav@462 | 20 |
+ "</body></html>"; |
jaroslav@462 | 21 |
String java = "package x.y.z;" |
jaroslav@462 | 22 |
+ "class X {" |
jaroslav@462 | 23 |
+ "}"; |
jaroslav@462 | 24 |
Map<String,byte[]> result = Compile.compile(html, java); |
jaroslav@462 | 25 |
|
jaroslav@462 | 26 |
assertNotNull(result.get("x/y/z/X.class"), "Class X is compiled: " + result); |
jaroslav@462 | 27 |
} |
jaroslav@462 | 28 |
} |