Search in sources :

Example 1 with BuildArtifactConfig

use of com.thoughtworks.go.config.BuildArtifactConfig in project gocd by gocd.

the class ArtifactPlanTest method toArtifactPlans_shouldConvertArtifactConfigsToArtifactPlanList.

@Test
public void toArtifactPlans_shouldConvertArtifactConfigsToArtifactPlanList() {
    final PluggableArtifactConfig artifactConfig = new PluggableArtifactConfig("id", "storeId", create("Foo", true, "Bar"));
    final ArtifactTypeConfigs artifactTypeConfigs = new ArtifactTypeConfigs(Arrays.asList(new BuildArtifactConfig("source", "destination"), new TestArtifactConfig("test-source", "test-destination"), artifactConfig));
    final List<ArtifactPlan> artifactPlans = ArtifactPlan.toArtifactPlans(artifactTypeConfigs);
    assertThat(artifactPlans, containsInAnyOrder(new ArtifactPlan(ArtifactPlanType.file, "source", "destination"), new ArtifactPlan(ArtifactPlanType.unit, "test-source", "test-destination"), new ArtifactPlan(artifactConfig.toJSON())));
}
Also used : PluggableArtifactConfig(com.thoughtworks.go.config.PluggableArtifactConfig) TestArtifactConfig(com.thoughtworks.go.config.TestArtifactConfig) BuildArtifactConfig(com.thoughtworks.go.config.BuildArtifactConfig) ArtifactTypeConfigs(com.thoughtworks.go.config.ArtifactTypeConfigs) Test(org.junit.jupiter.api.Test)

Aggregations

ArtifactTypeConfigs (com.thoughtworks.go.config.ArtifactTypeConfigs)1 BuildArtifactConfig (com.thoughtworks.go.config.BuildArtifactConfig)1 PluggableArtifactConfig (com.thoughtworks.go.config.PluggableArtifactConfig)1 TestArtifactConfig (com.thoughtworks.go.config.TestArtifactConfig)1 Test (org.junit.jupiter.api.Test)1