use of com.thoughtworks.go.plugin.domain.artifact.ArtifactPluginInfo in project gocd by gocd.
the class ArtifactPluginInfoBuilderTest method shouldBuildPluginInfoWithCapabilities.
@Test
public void shouldBuildPluginInfoWithCapabilities() {
GoPluginDescriptor descriptor = new GoPluginDescriptor("plugin1", null, null, null, null, false);
when(extension.getCapabilities(descriptor.id())).thenReturn(new Capabilities());
ArtifactPluginInfo pluginInfo = new ArtifactPluginInfoBuilder(extension).pluginInfoFor(descriptor);
assertNotNull(pluginInfo.getCapabilities());
}
use of com.thoughtworks.go.plugin.domain.artifact.ArtifactPluginInfo in project gocd by gocd.
the class ArtifactPluginInfoBuilderTest method shouldBuildPluginInfoWithPublishArtifactConfigSettings.
@Test
public void shouldBuildPluginInfoWithPublishArtifactConfigSettings() {
GoPluginDescriptor descriptor = new GoPluginDescriptor("plugin1", null, null, null, null, false);
List<PluginConfiguration> pluginConfigurations = Arrays.asList(new PluginConfiguration("FILENAME", new Metadata(true, false)));
when(extension.getPublishArtifactMetadata(descriptor.id())).thenReturn(pluginConfigurations);
when(extension.getPublishArtifactView(descriptor.id())).thenReturn("artifact_config");
ArtifactPluginInfo pluginInfo = new ArtifactPluginInfoBuilder(extension).pluginInfoFor(descriptor);
assertThat(pluginInfo.getArtifactConfigSettings(), Is.is(new PluggableInstanceSettings(pluginConfigurations, new PluginView("artifact_config"))));
}
Aggregations