Search in sources :

Example 1 with ProjectClient

use of org.jboss.pnc.client.ProjectClient in project pnc by project-ncl.

the class BuildConfigurationEndpointTest method prepareData.

@SuppressWarnings("unchecked")
@BeforeClass
public static void prepareData() throws Exception {
    BuildConfigurationClient bcc = new BuildConfigurationClient(RestClientConfiguration.asAnonymous());
    Iterator<BuildConfiguration> it = bcc.getAll().iterator();
    configurationId = it.next().getId();
    configuration2Id = it.next().getId();
    configuration3Id = it.next().getId();
    configuration4Id = it.next().getId();
    ProductClient pdc = new ProductClient(RestClientConfiguration.asAnonymous());
    productId = pdc.getAll().iterator().next().getId();
    EnvironmentClient ec = new EnvironmentClient(RestClientConfiguration.asAnonymous());
    environmentId = ec.getAll().iterator().next().getId();
    ProjectClient pjc = new ProjectClient(RestClientConfiguration.asAnonymous());
    projectId = pjc.getAll().iterator().next().getId();
    SCMRepositoryClient scmrc = new SCMRepositoryClient(RestClientConfiguration.asAnonymous());
    final Iterator<SCMRepository> scmrIt = scmrc.getAll(null, null).iterator();
    repositoryConfigurationId = scmrIt.next().getId();
    repositoryConfiguration2Id = scmrIt.next().getId();
}
Also used : BuildConfiguration(org.jboss.pnc.dto.BuildConfiguration) SCMRepositoryClient(org.jboss.pnc.client.SCMRepositoryClient) ProductClient(org.jboss.pnc.client.ProductClient) EnvironmentClient(org.jboss.pnc.client.EnvironmentClient) ProjectClient(org.jboss.pnc.client.ProjectClient) BuildConfigurationClient(org.jboss.pnc.client.BuildConfigurationClient) SCMRepository(org.jboss.pnc.dto.SCMRepository) BeforeClass(org.junit.BeforeClass)

Aggregations

BuildConfigurationClient (org.jboss.pnc.client.BuildConfigurationClient)1 EnvironmentClient (org.jboss.pnc.client.EnvironmentClient)1 ProductClient (org.jboss.pnc.client.ProductClient)1 ProjectClient (org.jboss.pnc.client.ProjectClient)1 SCMRepositoryClient (org.jboss.pnc.client.SCMRepositoryClient)1 BuildConfiguration (org.jboss.pnc.dto.BuildConfiguration)1 SCMRepository (org.jboss.pnc.dto.SCMRepository)1 BeforeClass (org.junit.BeforeClass)1