ko/archetype/src/main/resources/archetype-resources/src/test/java/IntegrationTest.java
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/ko/archetype/src/main/resources/archetype-resources/src/test/java/IntegrationTest.java Mon Jun 24 17:50:44 2013 +0200
1.3 @@ -0,0 +1,31 @@
1.4 +package ${package};
1.5 +
1.6 +import org.apidesign.bck2brwsr.vmtest.BrwsrTest;
1.7 +import org.apidesign.bck2brwsr.vmtest.HtmlFragment;
1.8 +import org.apidesign.bck2brwsr.vmtest.VMTest;
1.9 +import org.testng.annotations.Factory;
1.10 +
1.11 +/** Sometimes it is useful to run tests inside of the real browser.
1.12 + * To do that just annotate your method with {@link org.apidesign.bck2brwsr.vmtest.BrwsrTest}
1.13 + * and that is it. If your code references elements on the HTML page,
1.14 + * you can pass in an {@link org.apidesign.bck2brwsr.vmtest.HtmlFragment} which
1.15 + * will be made available on the page before your test starts.
1.16 + */
1.17 +public class IntegrationTest {
1.18 +
1.19 + /** Write to testing code here. Use <code>assert</code> (but not TestNG's
1.20 + * Assert, as TestNG is not compiled with target 1.6 yet).
1.21 + */
1.22 + @HtmlFragment(
1.23 + "<h1>Put this snippet on the HTML page</h1>\n"
1.24 + )
1.25 + @BrwsrTest
1.26 + public void runThisTestInABrowser() {
1.27 + }
1.28 +
1.29 + @Factory
1.30 + public static Object[] create() {
1.31 + return VMTest.create(IntegrationTest.class);
1.32 + }
1.33 +
1.34 +}