sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1392733 - in /sis/trunk/sis-utility/src/test/java/org/apache/sis: test/Dependency.java test/DependsOnMethod.java test/TestRunner.java util/CharSequencesTest.java util/resources/IndexedResourceBundleTest.java
Date Tue, 02 Oct 2012 04:14:46 GMT
Author: desruisseaux
Date: Tue Oct  2 04:14:45 2012
New Revision: 1392733

URL: http://svn.apache.org/viewvc?rev=1392733&view=rev
Log:
Renamed '@Dependency' as '@DependsOnMethod'. This leave room for a '@DependsOn(Class)'.

Added:
    sis/trunk/sis-utility/src/test/java/org/apache/sis/test/DependsOnMethod.java
      - copied, changed from r1392724, sis/trunk/sis-utility/src/test/java/org/apache/sis/test/Dependency.java
Removed:
    sis/trunk/sis-utility/src/test/java/org/apache/sis/test/Dependency.java
Modified:
    sis/trunk/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java
    sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
    sis/trunk/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java

Copied: sis/trunk/sis-utility/src/test/java/org/apache/sis/test/DependsOnMethod.java (from
r1392724, sis/trunk/sis-utility/src/test/java/org/apache/sis/test/Dependency.java)
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/test/java/org/apache/sis/test/DependsOnMethod.java?p2=sis/trunk/sis-utility/src/test/java/org/apache/sis/test/DependsOnMethod.java&p1=sis/trunk/sis-utility/src/test/java/org/apache/sis/test/Dependency.java&r1=1392724&r2=1392733&rev=1392733&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/test/java/org/apache/sis/test/Dependency.java (original)
+++ sis/trunk/sis-utility/src/test/java/org/apache/sis/test/DependsOnMethod.java Tue Oct 
2 04:14:45 2012
@@ -38,7 +38,7 @@ import java.lang.annotation.Target;
 @Documented
 @Target(ElementType.METHOD)
 @Retention(RetentionPolicy.RUNTIME)
-public @interface Dependency {
+public @interface DependsOnMethod {
     /**
      * The names of test methods on which the annotated method depends.
      *

Modified: sis/trunk/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java?rev=1392733&r1=1392732&r2=1392733&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java (original)
+++ sis/trunk/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java Tue Oct  2 04:14:45
2012
@@ -43,7 +43,7 @@ import static org.apache.sis.util.Arrays
  * This class extends the JUnit standard test runner with additional features:
  * <p>
  * <ul>
- *   <li>Support of the {@link Dependency} annotation.</li>
+ *   <li>Support of the {@link DependsOnMethod} annotation.</li>
  * </ul>
  * <p>
  * This runner is not designed for parallel execution of tests.
@@ -155,7 +155,7 @@ public final class TestRunner extends Bl
         Set<String> dependencies = null;
         for (int i=methods.length-1; --i>=0;) {
             final FrameworkMethod method = methods[i];
-            final Dependency depend = method.getAnnotation(Dependency.class);
+            final DependsOnMethod depend = method.getAnnotation(DependsOnMethod.class);
             if (depend != null) {
                 if (dependencies == null) {
                     dependencies = new HashSet<String>();
@@ -235,7 +235,7 @@ public final class TestRunner extends Bl
     @Override
     protected void runChild(final FrameworkMethod method, final RunNotifier notifier) {
         if (dependencyFailures != null) {
-            final Dependency assumptions = method.getAnnotation(Dependency.class);
+            final DependsOnMethod assumptions = method.getAnnotation(DependsOnMethod.class);
             if (assumptions != null) {
                 for (final String assumption : assumptions.value()) {
                     if (dependencyFailures.contains(assumption)) {

Modified: sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java?rev=1392733&r1=1392732&r2=1392733&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java (original)
+++ sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java Tue Oct
 2 04:14:45 2012
@@ -18,7 +18,7 @@ package org.apache.sis.util;
 
 import java.util.Arrays;
 import org.apache.sis.test.TestCase;
-import org.apache.sis.test.Dependency;
+import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.util.type.SimpleInternationalString;
 import org.junit.Test;
 
@@ -131,7 +131,7 @@ public final strictfp class CharSequence
      * Tests {@link CharSequences#parseDoubles(CharSequence, char)}.
      */
     @Test
-    @Dependency("testSplit")
+    @DependsOnMethod("testSplit")
     public void testParseDoubles() {
         assertArrayEquals(new double[] {5, 1.5, Double.NaN, -8}, parseDoubles("5 , 1.5,,
-8 ", ','), 0.0);
     }
@@ -140,7 +140,7 @@ public final strictfp class CharSequence
      * Tests {@link CharSequences#parseFloats(CharSequence, char)}.
      */
     @Test
-    @Dependency("testSplit")
+    @DependsOnMethod("testSplit")
     public void testParseFloats() {
         assertArrayEquals(new float[] {5, 1.5f, Float.NaN, -8}, parseFloats("5 , 1.5,, -8
", ','), 0f);
     }
@@ -149,7 +149,7 @@ public final strictfp class CharSequence
      * Tests {@link CharSequences#parseLongs(CharSequence, char, int)}.
      */
     @Test
-    @Dependency("testSplit")
+    @DependsOnMethod("testSplit")
     public void testParseLongs() {
         assertArrayEquals(new long[] {5, 2, -8}, parseLongs("5 , 2, -8 ", ',', 10));
     }
@@ -158,7 +158,7 @@ public final strictfp class CharSequence
      * Tests {@link CharSequences#parseInts(CharSequence, char, int)}.
      */
     @Test
-    @Dependency("testSplit")
+    @DependsOnMethod("testSplit")
     public void testParseInts() {
         assertArrayEquals(new int[] {5, 2, -8}, parseInts("5 , 2, -8 ", ',', 10));
     }
@@ -167,7 +167,7 @@ public final strictfp class CharSequence
      * Tests {@link CharSequences#parseShorts(CharSequence, char, int)}.
      */
     @Test
-    @Dependency("testSplit")
+    @DependsOnMethod("testSplit")
     public void testParseShorts() {
         assertArrayEquals(new short[] {5, 2, -8}, parseShorts("5 , 2, -8 ", ',', 10));
     }
@@ -176,7 +176,7 @@ public final strictfp class CharSequence
      * Tests {@link CharSequences#parseBytes(CharSequence, char, int)}.
      */
     @Test
-    @Dependency("testSplit")
+    @DependsOnMethod("testSplit")
     public void testParseBytes() {
         assertArrayEquals(new byte[] {5, 2, -8}, parseBytes("5 , 2, -8 ", ',', 10));
     }

Modified: sis/trunk/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java?rev=1392733&r1=1392732&r2=1392733&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java
(original)
+++ sis/trunk/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java
Tue Oct  2 04:14:45 2012
@@ -18,7 +18,7 @@ package org.apache.sis.util.resources;
 
 import java.util.Locale;
 import org.opengis.util.InternationalString;
-import org.apache.sis.test.Dependency;
+import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
@@ -57,7 +57,7 @@ public final strictfp class IndexedResou
      * Tests the {@link IndexedResourceBundle#getString(int, Object)} method on different
locales.
      */
     @Test
-    @Dependency("testGetString")
+    @DependsOnMethod("testGetString")
     public void testGetStringWithParameter() {
         assertEquals("Argument ‘CRS’ shall not be null.",
                 Errors.getResources(Locale.ENGLISH).getString(Errors.Keys.NullArgument_1,
"CRS"));



Mime
View raw message