use of com.thoughtworks.go.plugin.infra.PluginLoader in project gocd by gocd.
the class DefaultPluginJarChangeListenerTest method setUp.
@BeforeEach
void setUp(@TempDir File rootDir) {
temporaryFolder = new FileHelper(rootDir);
bundleDir = temporaryFolder.newFolder("bundleDir");
pluginWorkDir = temporaryFolder.newFolder("pluginDir");
registry = mock(DefaultPluginRegistry.class);
osgiManifestGenerator = mock(GoPluginOSGiManifest.DefaultGoPluginOSGiManifestCreator.class);
pluginLoader = mock(PluginLoader.class);
goPluginBundleDescriptorBuilder = mock(GoPluginBundleDescriptorBuilder.class);
systemEnvironment = mock(SystemEnvironment.class);
when(systemEnvironment.get(PLUGIN_ACTIVATOR_JAR_PATH)).thenReturn("defaultFiles/go-plugin-activator.jar");
when(systemEnvironment.get(PLUGIN_WORK_DIR)).thenReturn(bundleDir.getAbsolutePath());
when(systemEnvironment.getOperatingSystemFamilyName()).thenReturn("Linux");
listener = new DefaultPluginJarChangeListener(registry, osgiManifestGenerator, pluginLoader, goPluginBundleDescriptorBuilder, systemEnvironment);
}
Aggregations