Search in sources :

Example 6 with ArtifactPluginInfo

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());
}
Also used : Capabilities(com.thoughtworks.go.plugin.domain.artifact.Capabilities) GoPluginDescriptor(com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor) ArtifactPluginInfo(com.thoughtworks.go.plugin.domain.artifact.ArtifactPluginInfo) Test(org.junit.Test)

Example 7 with ArtifactPluginInfo

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"))));
}
Also used : GoPluginDescriptor(com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor) ArtifactPluginInfo(com.thoughtworks.go.plugin.domain.artifact.ArtifactPluginInfo) Test(org.junit.Test)

Aggregations

ArtifactPluginInfo (com.thoughtworks.go.plugin.domain.artifact.ArtifactPluginInfo)7 Test (org.junit.Test)7 GoPluginDescriptor (com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor)5 ConfigurationKey (com.thoughtworks.go.domain.config.ConfigurationKey)1 ConfigurationProperty (com.thoughtworks.go.domain.config.ConfigurationProperty)1 ConfigurationValue (com.thoughtworks.go.domain.config.ConfigurationValue)1 Capabilities (com.thoughtworks.go.plugin.domain.artifact.Capabilities)1 Metadata (com.thoughtworks.go.plugin.domain.common.Metadata)1 PluggableInstanceSettings (com.thoughtworks.go.plugin.domain.common.PluggableInstanceSettings)1 PluginConfiguration (com.thoughtworks.go.plugin.domain.common.PluginConfiguration)1