Commits

Anonymous committed b3944dd

Refactoring configuration / property loading

  • Participants
  • Parent commits ded56fe

Comments (0)

Files changed (2)

File compchem-test-harness/src/test/java/net/chempound/compchem/CompChemIntegrationTest.java

 import net.chempound.compchem.gaussian.GaussianLogImporter;
 import net.chempound.compchem.nwchem.NWChemLogImporter;
 import net.chempound.config.ChempoundConfiguration;
-import net.chempound.config.DefaultChempoundConfiguration;
+import net.chempound.config.DefaultPropertySource;
+import net.chempound.config.StubChempoundConfiguration;
 import net.chempound.content.DepositRequest;
 import net.chempound.rdf.DCTerms;
 import net.chempound.storage.DepositResource;
 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;
         workspace = createWorkspace();
 
         Injector injector = Guice.createInjector(
-                new ChempoundConfigurationModule(initConfiguration()),
+                new ChempoundConfigurationModule(initConfiguration(), new DefaultPropertySource()),
                 new DefaultChempoundModule(),
                 new DefaultChempoundWebModule(),
                 new CompChemModule()
     }
 
     protected ChempoundConfiguration initConfiguration() throws IOException {
-        return DefaultChempoundConfiguration.load(URI.create(REPO_URI), workspace);
+        return StubChempoundConfiguration.load(URI.create(REPO_URI), workspace);
     }
 
     private void closeQuietly(Response response) {

File compchem-test-harness/src/test/java/net/chempound/compchem/CompChemSearchIntegrationTest.java

 import net.chempound.DefaultChempoundModule;
 import net.chempound.chemistry.ImageGenerator;
 import net.chempound.chemistry.InChIGenerator;
-import net.chempound.compchem.gaussian.GaussianLogImporter;
 import net.chempound.compchem.nwchem.NWChemLogImporter;
 import net.chempound.config.ChempoundConfiguration;
-import net.chempound.config.DefaultChempoundConfiguration;
+import net.chempound.config.DefaultPropertySource;
+import net.chempound.config.StubChempoundConfiguration;
 import net.chempound.content.DepositRequest;
 import net.chempound.webapp.DefaultChempoundWebModule;
 import org.apache.commons.io.FileUtils;
         workspace = createWorkspace();
 
         Injector injector = Guice.createInjector(
-                new ChempoundConfigurationModule(initConfiguration()),
+                new ChempoundConfigurationModule(initConfiguration(), new DefaultPropertySource()),
                 new DefaultChempoundModule(),
                 new DefaultChempoundWebModule(),
                 new CompChemModule()
 
     protected static ChempoundConfiguration initConfiguration() throws IOException {
         URI uri = URI.create("http://localhost:8716/");
-        return DefaultChempoundConfiguration.load(uri, workspace);
+        return StubChempoundConfiguration.load(uri, workspace);
     }
 
     private static void closeQuietly(Response response) {