# HG changeset patch # User Jaroslav Tulach # Date 1362083755 -3600 # Node ID 7b5a053c676325a6f12be994e167e2fca0af8f8f # Parent a9fbc3c4be979890d619db0798fdded2fffddcb4 Better VM test Javadoc diff -r a9fbc3c4be97 -r 7b5a053c6763 rt/vmtest/pom.xml --- a/rt/vmtest/pom.xml Thu Feb 28 21:14:11 2013 +0100 +++ b/rt/vmtest/pom.xml Thu Feb 28 21:35:55 2013 +0100 @@ -24,6 +24,13 @@ 1.7 + + org.apache.maven.plugins + maven-javadoc-plugin + + org.apidesign.bck2brwsr.vmtest.impl + + diff -r a9fbc3c4be97 -r 7b5a053c6763 rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/Http.java --- a/rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/Http.java Thu Feb 28 21:14:11 2013 +0100 +++ b/rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/Http.java Thu Feb 28 21:35:55 2013 +0100 @@ -23,8 +23,7 @@ import java.lang.annotation.Target; /** - * Exposes HTTP page or pages to the running {@link BrwsrTest}, so it can access under - * the relative path. + * Exposes an {@link Resource HTTP page} or a set of {@link #value() pages} to the running {@link BrwsrTest}. * * @author Jaroslav Tulach */ @@ -34,8 +33,10 @@ /** Set of pages to make available */ public Resource[] value(); - /** Exposes an HTTP page to the running {@link BrwsrTest}, so it can access - * under the relative path. + /** Describes single HTTP page to the running {@link BrwsrTest}, so it can be + * accessed under the specified {@link #path() relative path}. The page + * content can either be specified inline via {@link #content()} or as + * an external {@link #resource() resource}. * * @author Jaroslav Tulach */ @@ -44,7 +45,7 @@ public @interface Resource { /** path on the server that the test can use to access the exposed resource */ String path(); - /** the content of the HttpResource */ + /** the content of the Http.Resource */ String content(); /** resource relative to the class that should be used instead of content. * Leave content equal to empty string. diff -r a9fbc3c4be97 -r 7b5a053c6763 rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/VMTest.java --- a/rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/VMTest.java Thu Feb 28 21:14:11 2013 +0100 +++ b/rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/VMTest.java Thu Feb 28 21:35:55 2013 +0100 @@ -17,22 +17,35 @@ */ package org.apidesign.bck2brwsr.vmtest; +import org.apidesign.bck2brwsr.launcher.Launcher; import org.apidesign.bck2brwsr.vmtest.impl.CompareCase; import org.testng.annotations.Factory; -/** A TestNG {@link Factory} that seeks for {@link Compare} annotations - * in provided class and builds set of tests that compare the computations - * in real as well as JavaScript virtual machines. Use as:
+/** A TestNG {@link Factory} that seeks for {@link Compare} and {@link BrwsrTest} annotations
+ * in provided class and builds set of tests that verify the functionality of Bck2Brwsr 
+ * based system. Use as:
+ * 
  * {@code @}{@link Factory} public static create() {
- *   return @{link VMTest}.{@link #create(YourClass.class);
+ *   return @{link VMTest}.{@link #create(java.lang.Class) create}(YourClass.class);
  * }
- * + * where YourClass contains methods annotated with + * {@link Compare} and {@link BrwsrTest} annotations. + * * @author Jaroslav Tulach */ public final class VMTest { - /** Inspects clazz and for each {@lik Compare} method creates - * instances of tests. Each instance runs the test in different virtual + private VMTest() { + } + + /** Inspects clazz and for each method annotated by + * {@link Compare} or {@link BrwsrTest} creates + * instances of tests. + *

+ * Each {@link Compare} instance runs the test in different virtual * machine and at the end they compare the results. + *

+ * Each {@link BrwsrTest} annotated method is executed once in {@link Launcher started + * browser}. * * @param clazz the class to inspect * @return the set of created tests