Search in sources :

Example 1 with PackageRepositoryExtension

use of com.thoughtworks.go.plugin.access.packagematerial.PackageRepositoryExtension in project gocd by gocd.

the class PackageMaterialPollerTest method setup.

@Before
public void setup() {
    // setup material
    material = new PackageMaterial();
    PackageRepository packageRepository = PackageRepositoryMother.create("id", "name", "plugin-id", "plugin-version", new Configuration(ConfigurationPropertyMother.create("url", false, "http://some-url")));
    PackageDefinition packageDefinition = create("id", "package", new Configuration(ConfigurationPropertyMother.create("name", false, "go-agent"), ConfigurationPropertyMother.create("secure", true, "value")), packageRepository);
    material.setPackageDefinition(packageDefinition);
    packageRepositoryExtension = mock(PackageRepositoryExtension.class);
    poller = new com.thoughtworks.go.server.service.materials.PackageMaterialPoller(packageRepositoryExtension);
    packageConfiguration = ArgumentCaptor.forClass(com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration.class);
    repositoryConfiguration = ArgumentCaptor.forClass(RepositoryConfiguration.class);
}
Also used : Configuration(com.thoughtworks.go.domain.config.Configuration) RepositoryConfiguration(com.thoughtworks.go.plugin.api.material.packagerepository.RepositoryConfiguration) PackageMaterial(com.thoughtworks.go.config.materials.PackageMaterial) PackageDefinition(com.thoughtworks.go.domain.packagerepository.PackageDefinition) PackageRepository(com.thoughtworks.go.domain.packagerepository.PackageRepository) PackageRepositoryExtension(com.thoughtworks.go.plugin.access.packagematerial.PackageRepositoryExtension) RepositoryConfiguration(com.thoughtworks.go.plugin.api.material.packagerepository.RepositoryConfiguration) Before(org.junit.Before)

Aggregations

PackageMaterial (com.thoughtworks.go.config.materials.PackageMaterial)1 Configuration (com.thoughtworks.go.domain.config.Configuration)1 PackageDefinition (com.thoughtworks.go.domain.packagerepository.PackageDefinition)1 PackageRepository (com.thoughtworks.go.domain.packagerepository.PackageRepository)1 PackageRepositoryExtension (com.thoughtworks.go.plugin.access.packagematerial.PackageRepositoryExtension)1 RepositoryConfiguration (com.thoughtworks.go.plugin.api.material.packagerepository.RepositoryConfiguration)1 Before (org.junit.Before)1