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())));
}
Aggregations