Commits

Anonymous committed 9f70b65

Refactoring configuration / property loading

  • Participants
  • Parent commits 04a5f27

Comments (0)

Files changed (2)

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

 import net.chempound.chemistry.ImageGenerator;
 import net.chempound.chemistry.InChIGenerator;
 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.crystal.importer.CrystalStructureImporter;
 import net.chempound.crystal.importer.utils.CifIO;
         workspace = createWorkspace();
 
         Injector injector = Guice.createInjector(
-                new ChempoundConfigurationModule(initConfiguration()),
+                new ChempoundConfigurationModule(initConfiguration(), new DefaultPropertySource()),
                 new DefaultChempoundModule(),
                 new DefaultChempoundWebModule(),
                 new CrystallographyModule()
 
     protected ChempoundConfiguration initConfiguration() throws IOException {
         URI uri = URI.create("http://localhost:8714/");
-        return DefaultChempoundConfiguration.load(uri, workspace);
+        return StubChempoundConfiguration.load(uri, workspace);
     }
 
 

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

 import net.chempound.chemistry.ImageGenerator;
 import net.chempound.chemistry.InChIGenerator;
 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.crystal.importer.CrystalStructureImporter;
 import net.chempound.webapp.DefaultChempoundWebModule;
         workspace = createWorkspace();
 
         Injector injector = Guice.createInjector(
-                new ChempoundConfigurationModule(initConfiguration()),
+                new ChempoundConfigurationModule(initConfiguration(), new DefaultPropertySource()),
                 new DefaultChempoundModule(),
                 new DefaultChempoundWebModule(),
                 new CrystallographyModule()
 
     protected static ChempoundConfiguration initConfiguration() throws IOException {
         URI uri = URI.create("http://localhost:8715/");
-        return DefaultChempoundConfiguration.load(uri, workspace);
+        return StubChempoundConfiguration.load(uri, workspace);
     }