ko/archetype/src/main/resources/archetype-resources/src/test/java/IntegrationTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Mon, 24 Jun 2013 17:50:44 +0200
branchclassloader
changeset 1225 73c0973e8e0a
parent 1202 ko-archetype/src/main/resources/archetype-resources/src/test/java/IntegrationTest.java@5f04bdbc6ee1
permissions -rw-r--r--
Moving all knockout related code under the 'ko' directory
     1 package ${package};
     2 
     3 import org.apidesign.bck2brwsr.vmtest.BrwsrTest;
     4 import org.apidesign.bck2brwsr.vmtest.HtmlFragment;
     5 import org.apidesign.bck2brwsr.vmtest.VMTest;
     6 import org.testng.annotations.Factory;
     7 
     8 /** Sometimes it is useful to run tests inside of the real browser. 
     9  * To do that just annotate your method with {@link org.apidesign.bck2brwsr.vmtest.BrwsrTest}
    10  * and that is it. If your code references elements on the HTML page,
    11  * you can pass in an {@link org.apidesign.bck2brwsr.vmtest.HtmlFragment} which
    12  * will be made available on the page before your test starts.
    13  */
    14 public class IntegrationTest {
    15     
    16     /** Write to testing code here. Use <code>assert</code> (but not TestNG's
    17      * Assert, as TestNG is not compiled with target 1.6 yet).
    18      */
    19     @HtmlFragment(
    20         "<h1>Put this snippet on the HTML page</h1>\n"
    21     )
    22     @BrwsrTest
    23     public void runThisTestInABrowser() {
    24     }
    25 
    26     @Factory
    27     public static Object[] create() {
    28         return VMTest.create(IntegrationTest.class);
    29     }
    30     
    31 }