Search in sources :

Example 1 with PluginManager

use of com.accenture.trac.common.plugin.PluginManager in project tracdap by finos.

the class ConfigManagerTest method setup.

@BeforeEach
void setup() throws Exception {
    plugins = new PluginManager();
    plugins.initConfigPlugins();
    Files.createDirectory(tempDir.resolve("config_dir"));
    for (var sourceFile : CONFIG_SAMPLES) {
        var fileName = Paths.get(sourceFile).getFileName();
        var targetPath = tempDir.resolve("config_dir").resolve(fileName);
        try (var inputStream = getClass().getResourceAsStream(sourceFile);
            var outputStream = Files.newOutputStream(targetPath)) {
            if (inputStream == null)
                throw new EUnexpected();
            inputStream.transferTo(outputStream);
        }
    }
    TestConfigPlugin.setCurrentTempDir(tempDir);
}
Also used : PluginManager(com.accenture.trac.common.plugin.PluginManager) EUnexpected(com.accenture.trac.common.exception.EUnexpected) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with PluginManager

use of com.accenture.trac.common.plugin.PluginManager in project tracdap by finos.

the class StartupSequence method initConfigPlugins.

public void initConfigPlugins() {
    plugins = new PluginManager();
    plugins.initConfigPlugins();
}
Also used : PluginManager(com.accenture.trac.common.plugin.PluginManager)

Aggregations

PluginManager (com.accenture.trac.common.plugin.PluginManager)2 EUnexpected (com.accenture.trac.common.exception.EUnexpected)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1