incubator-oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke...@apache.org
Subject svn commit: r965140 - /incubator/oodt/trunk/metadata/src/test/org/apache/oodt/cas/metadata/extractors/TestExternMetExtractorConfigReader.java
Date Sat, 17 Jul 2010 21:53:20 GMT
Author: kelly
Date: Sat Jul 17 21:53:20 2010
New Revision: 965140

URL: http://svn.apache.org/viewvc?rev=965140&view=rev
Log:
Use MetadataTestCase as a base in order to get test data files via 'getTestDataFile'

Modified:
    incubator/oodt/trunk/metadata/src/test/org/apache/oodt/cas/metadata/extractors/TestExternMetExtractorConfigReader.java

Modified: incubator/oodt/trunk/metadata/src/test/org/apache/oodt/cas/metadata/extractors/TestExternMetExtractorConfigReader.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/metadata/src/test/org/apache/oodt/cas/metadata/extractors/TestExternMetExtractorConfigReader.java?rev=965140&r1=965139&r2=965140&view=diff
==============================================================================
--- incubator/oodt/trunk/metadata/src/test/org/apache/oodt/cas/metadata/extractors/TestExternMetExtractorConfigReader.java
(original)
+++ incubator/oodt/trunk/metadata/src/test/org/apache/oodt/cas/metadata/extractors/TestExternMetExtractorConfigReader.java
Sat Jul 17 21:53:20 2010
@@ -18,6 +18,9 @@
 
 package org.apache.oodt.cas.metadata.extractors;
 
+// Metadata imports
+import org.apache.oodt.cas.metadata.MetadataTestCase;
+
 //JDK imports
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -34,11 +37,19 @@ import junit.framework.TestCase;
  * Test suite for the {@link ExternConfigReader}
  * </p>.
  */
-public class TestExternMetExtractorConfigReader extends TestCase {
+public class TestExternMetExtractorConfigReader extends MetadataTestCase {
+    /**
+     * Construct a TestExternMetExtractorConfigReader instance.
+     *
+     * @param name Case name.
+     */
+    public TestExternMetExtractorConfigReader(String name) {
+        super(name);
+    }
 
-    private static final String configFilePath = "./src/main/resources/examples/extern-config.xml";
+    private static final String configFilePath = "extern-config.xml";
 
-    private static final String expectedBinPathEnding = "src/test/gov/nasa/jpl/oodt/cas/metadata/extractors/testExtractor";
+    private static final String expectedBinPathEnding = "testdata/testExtractor";
 
     private static final String arg1 = ExternMetExtractorMetKeys.DATA_FILE_PLACE_HOLDER;
 
@@ -55,7 +66,7 @@ public class TestExternMetExtractorConfi
     public void testReadConfig() {
         ExternalMetExtractorConfig config = null;
         try {
-            config = (ExternalMetExtractorConfig) new ExternConfigReader().parseConfigFile(new
File(configFilePath));
+            config = (ExternalMetExtractorConfig) new ExternConfigReader().parseConfigFile(getTestDataFile(configFilePath));
         } catch (Exception e) {
             fail(e.getMessage());
         }



Mime
View raw message