commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1299241 - in /commons/proper/collections/trunk: data/ src/test/java/org/apache/commons/collections/ src/test/java/org/apache/commons/collections/comparators/ src/test/java/org/apache/commons/collections/splitmap/ src/test/resources/ src/te...
Date Sat, 10 Mar 2012 17:49:29 GMT
Author: sebb
Date: Sat Mar 10 17:49:28 2012
New Revision: 1299241

URL: http://svn.apache.org/viewvc?rev=1299241&view=rev
Log:
Move test data under test/resources

Added:
    commons/proper/collections/trunk/src/test/resources/
    commons/proper/collections/trunk/src/test/resources/data/
      - copied from r1299215, commons/proper/collections/trunk/data/
Removed:
    commons/proper/collections/trunk/data/
Modified:
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/AbstractTestObject.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/BulkTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/comparators/AbstractTestComparator.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/splitmap/TestTransformedMap.java

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/AbstractTestObject.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/AbstractTestObject.java?rev=1299241&r1=1299240&r2=1299241&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/AbstractTestObject.java
(original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/AbstractTestObject.java
Sat Mar 10 17:49:28 2012
@@ -233,7 +233,7 @@ public abstract class AbstractTestObject
 
     protected String getCanonicalEmptyCollectionName(Object object) {
         StringBuilder retval = new StringBuilder();
-        retval.append("data/test/");
+        retval.append(TEST_DATA_PATH);
         String colName = object.getClass().getName();
         colName = colName.substring(colName.lastIndexOf(".") + 1, colName.length());
         retval.append(colName);
@@ -245,7 +245,7 @@ public abstract class AbstractTestObject
 
     protected String getCanonicalFullCollectionName(Object object) {
         StringBuilder retval = new StringBuilder();
-        retval.append("data/test/");
+        retval.append(TEST_DATA_PATH);
         String colName = object.getClass().getName();
         colName = colName.substring(colName.lastIndexOf(".") + 1, colName.length());
         retval.append(colName);

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/BulkTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/BulkTest.java?rev=1299241&r1=1299240&r2=1299241&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/BulkTest.java
(original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/BulkTest.java
Sat Mar 10 17:49:28 2012
@@ -148,6 +148,9 @@ public class BulkTest extends TestCase i
     // method name for every simple test it defines.  
 
 
+    /** Path to test data resources */
+    protected static final String TEST_DATA_PATH = "src/test/resources/data/test/";
+
     /**
      *  The full name of this bulk test instance.  This is the full name
      *  that is compared to {@link #ignoredTests} to see if this

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/comparators/AbstractTestComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/comparators/AbstractTestComparator.java?rev=1299241&r1=1299240&r2=1299241&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/comparators/AbstractTestComparator.java
(original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/comparators/AbstractTestComparator.java
Sat Mar 10 17:49:28 2012
@@ -174,7 +174,7 @@ public abstract class AbstractTestCompar
 
     public String getCanonicalComparatorName(Object object) {
         StringBuilder retval = new StringBuilder();
-        retval.append("data/test/");
+        retval.append(TEST_DATA_PATH);
         String colName = object.getClass().getName();
         colName = colName.substring(colName.lastIndexOf(".")+1,colName.length());
         retval.append(colName);

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/splitmap/TestTransformedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/splitmap/TestTransformedMap.java?rev=1299241&r1=1299240&r2=1299241&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/splitmap/TestTransformedMap.java
(original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/splitmap/TestTransformedMap.java
Sat Mar 10 17:49:28 2012
@@ -126,7 +126,7 @@ public class TestTransformedMap extends 
                 NOPTransformer.<String>nopTransformer(),
                 NOPTransformer.<String>nopTransformer() );
 
-        ObjectInputStream in = new ObjectInputStream( new FileInputStream( "data/test/TransformedMap.emptyCollection.version3.2.obj"
) );
+        ObjectInputStream in = new ObjectInputStream( new FileInputStream( TEST_DATA_PATH+"/TransformedMap.emptyCollection.version3.2.obj"
) );
         Object readObject = in.readObject();
         in.close();
 
@@ -145,7 +145,7 @@ public class TestTransformedMap extends 
         map.put( "e", "f" );
         map.put( "g", "h" );
 
-        ObjectInputStream in = new ObjectInputStream( new FileInputStream( "data/test/TransformedMap.fullCollection.version3.2.obj"
) );
+        ObjectInputStream in = new ObjectInputStream( new FileInputStream( TEST_DATA_PATH+"TransformedMap.fullCollection.version3.2.obj"
) );
         Object readObject = in.readObject();
         in.close();
 



Mime
View raw message