use of org.mycore.common.config.MCRConfigurationLoader in project mycore by MyCoRe-Org.
the class MCRTestCaseHelper method before.
public static void before(Map<String, String> testProperties) {
String mcrComp = MCRRuntimeComponentDetector.getMyCoReComponents().stream().map(MCRComponent::toString).collect(Collectors.joining(", "));
String appMod = MCRRuntimeComponentDetector.getApplicationModules().stream().map(MCRComponent::toString).collect(Collectors.joining(", "));
System.out.printf("MyCoRe components detected: %s\nApplications modules detected: %s\n", mcrComp.isEmpty() ? "'none'" : mcrComp, appMod.isEmpty() ? "'none'" : appMod);
MCRConfiguration config = MCRConfiguration.instance();
MCRConfigurationLoader configurationLoader = MCRConfigurationLoaderFactory.getConfigurationLoader();
HashMap<String, String> baseProperties = new HashMap<>(configurationLoader.load());
baseProperties.putAll(testProperties);
config.initialize(baseProperties, true);
}
Aggregations