Commits

Anonymous committed 1b37ed3

Simplifying test configuration

Comments (0)

Files changed (2)

crystallography-test-harness/src/test/java/net/chempound/crystal/CrystalIntegrationTest.java

 import org.apache.abdera.model.Document;
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.IOUtils;
 import org.junit.After;
 import org.junit.Before;
     }
 
     protected ChempoundConfiguration initConfiguration() throws IOException {
-        URI uri = URI.create("http://localhost:8714/");
-        return StubChempoundConfiguration.load(uri, workspace);
+        final URI uri = URI.create("http://localhost:8714/");
+        return new StubChempoundConfiguration(uri, workspace);
     }
 
 
     }
 
 
-    private static String getId(File file) {
-        String filename = file.getName();
-        String ext = FilenameUtils.getExtension(filename).toLowerCase();
-        if ("cif".equals(ext) || "txt".equals(ext)) {
-            int l = filename.length();
-            filename.substring(0, l-4);
-        }
-        return filename;
-    }
-
-
     static Deposit createDeposit(String id, DepositRequest request) throws IOException {
         Deposit deposit = new Deposit();
 

crystallography-test-harness/src/test/java/net/chempound/crystal/CrystalSearchIntegrationTest.java

     }
 
     protected static ChempoundConfiguration initConfiguration() throws IOException {
-        URI uri = URI.create("http://localhost:8715/");
-        return StubChempoundConfiguration.load(uri, workspace);
+        final URI uri = URI.create("http://localhost:8715/");
+        return new StubChempoundConfiguration(uri, workspace);
     }