From 86a455501b040523c9a22cc9db2091759314eeb2 Mon Sep 17 00:00:00 2001 From: Bob Lee Date: Tue, 29 Sep 2009 09:20:16 +0000 Subject: Added Javadocs for TCK. git-svn-id: https://atinject.googlecode.com/svn/trunk@42 3bc8319c-20ab-11de-9edc-3f40a397ab60 --- build.sh | 4 ++++ tck/org/atinject/tck/Tck.java | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index 8aed304..0efb34e 100755 --- a/build.sh +++ b/build.sh @@ -19,6 +19,9 @@ License, Version 2.0." # Generate Javadocs. javadoc -protected -bottom "$FOOTER" \ -sourcepath src -d build/javadoc javax.inject +javadoc -classpath build/classes:lib/junit.jar -private -bottom "$FOOTER" \ + -sourcepath tck -d build/tck-javadoc org.atinject.tck \ + org.atinject.tck.auto org.atinject.tck.auto.accessories # Generate jars. cp -R src build @@ -31,6 +34,7 @@ jar cfM build/dist/$NAME-src.zip -C build/src . jar cfM build/dist/$NAME-tck-src.zip -C build/tck-src . jar cfM build/dist/$NAME-javadoc.zip -C build/javadoc . +jar cfM build/dist/$NAME-tck-javadoc.zip -C build/tck-javadoc . jar cfM build/dist/$NAME.jar -C build/classes . jar cfM build/dist/$NAME-tck.jar -C build/tck . diff --git a/tck/org/atinject/tck/Tck.java b/tck/org/atinject/tck/Tck.java index cead878..c915dcf 100644 --- a/tck/org/atinject/tck/Tck.java +++ b/tck/org/atinject/tck/Tck.java @@ -23,17 +23,22 @@ import junit.framework.Test; import junit.framework.TestSuite; /** - * Call {@link #testsFor} from a JUnit {@code suite} method: + * Maufactures the compatibility test suite. Call {@link #testsFor testsFor} + * from a JUnit static {@code suite} method: * *
+ * import junit.framework.Test;
+ * import org.atinject.tck.Tck;
+ *
  * public class MyTck {
  *   public static Test suite() {
- *     return Tck.testsFor(new MyInjector().getInstance(Car.class), true, true);
+ *     Car car = new MyInjector().getInstance(Car.class);
+ *     return Tck.testsFor(car, true, true);
  *   }
  * }
  * 
* - *

Then, run the tests using JUnit. For example: + *

Run the tests using JUnit. For example: * *

  * java junit.textui.TestRunner MyTck
@@ -61,9 +66,10 @@ public class Tck {
      *       FuelTank}.
      * 
      *
-     * 

If static injection is supported, the static members of the following - * types shall also be injected: {@link org.atinject.tck.auto.Convertible - * Convertible}, {@link org.atinject.tck.auto.Tire Tire}, and {@link + *

If static member injection is supported, the static members of the + * following types shall also be injected: + * {@link org.atinject.tck.auto.Convertible Convertible}, + * {@link org.atinject.tck.auto.Tire Tire}, and {@link * org.atinject.tck.auto.accessories.SpareTire SpareTire}. * * @param car to test -- cgit v1.2.3