Commits

Anonymous committed b3944dd

Refactoring configuration / property loading

Comments (0)

Files changed (2)

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) {

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) {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.