Search in sources :

Example 1 with Parameter

use of org.jboss.pnc.dto.response.Parameter in project pnc by project-ncl.

the class BuildConfigurationEndpointTest method testGetSupportedParameters.

@Test
public void testGetSupportedParameters() throws ClientException {
    BuildConfigurationClient client = new BuildConfigurationClient(RestClientConfiguration.asAnonymous());
    Set<Parameter> all = client.getSupportedParameters();
    assertThat(all).haveExactly(1, new Condition<>(p -> p.getName().equals(BuildConfigurationParameterKeys.ALIGNMENT_PARAMETERS.name()) && p.getDescription().startsWith("Additional parameters, which will be "), "has PME parameter")).size().isGreaterThanOrEqualTo(4);
}
Also used : PatchBuilderException(org.jboss.pnc.client.patch.PatchBuilderException) Arquillian(org.jboss.arquillian.junit.Arquillian) GroupConfiguration(org.jboss.pnc.dto.GroupConfiguration) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) LoggerFactory(org.slf4j.LoggerFactory) ClientErrorException(javax.ws.rs.ClientErrorException) ProjectClient(org.jboss.pnc.client.ProjectClient) BuildConfigurationClient(org.jboss.pnc.client.BuildConfigurationClient) Map(java.util.Map) Assertions(org.assertj.core.api.Assertions) BadRequestException(javax.ws.rs.BadRequestException) BuildConfigurationRevision(org.jboss.pnc.dto.BuildConfigurationRevision) Deployments(org.jboss.pnc.integration.setup.Deployments) BuildConfigurationParameterKeys(org.jboss.pnc.api.constants.BuildConfigurationParameterKeys) BuildConfigurationPatchBuilder(org.jboss.pnc.client.patch.BuildConfigurationPatchBuilder) AlignmentParameters(org.jboss.pnc.dto.response.AlignmentParameters) EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) EnvironmentClient(org.jboss.pnc.client.EnvironmentClient) Parameter(org.jboss.pnc.dto.response.Parameter) Set(java.util.Set) UUID(java.util.UUID) Category(org.junit.experimental.categories.Category) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) NotFoundException(javax.ws.rs.NotFoundException) BuildConfigCreationResponse(org.jboss.pnc.dto.response.BuildConfigCreationResponse) List(java.util.List) BeforeClass(org.junit.BeforeClass) BuildConfigWithSCMRequest(org.jboss.pnc.dto.requests.BuildConfigWithSCMRequest) RunWith(org.junit.runner.RunWith) ProductClient(org.jboss.pnc.client.ProductClient) DTOEntity(org.jboss.pnc.dto.DTOEntity) HashMap(java.util.HashMap) RunAsClient(org.jboss.arquillian.container.test.api.RunAsClient) Environment(org.jboss.pnc.dto.Environment) RemoteCollection(org.jboss.pnc.client.RemoteCollection) ArrayList(java.util.ArrayList) BuildConfigurationRef(org.jboss.pnc.dto.BuildConfigurationRef) ContainerTest(org.jboss.pnc.test.category.ContainerTest) ClientException(org.jboss.pnc.client.ClientException) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) ProjectRef(org.jboss.pnc.dto.ProjectRef) BuildType(org.jboss.pnc.enums.BuildType) BuildsFilterParameters(org.jboss.pnc.rest.api.parameters.BuildsFilterParameters) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence) RestClientConfiguration(org.jboss.pnc.integration.setup.RestClientConfiguration) Assert.assertNotEquals(org.junit.Assert.assertNotEquals) SCMRepositoryClient(org.jboss.pnc.client.SCMRepositoryClient) Build(org.jboss.pnc.dto.Build) BuildConfiguration(org.jboss.pnc.dto.BuildConfiguration) BuildConfigurationWithLatestBuild(org.jboss.pnc.dto.BuildConfigurationWithLatestBuild) SCMRepository(org.jboss.pnc.dto.SCMRepository) Ignore(org.junit.Ignore) Deployment(org.jboss.arquillian.container.test.api.Deployment) Condition(org.assertj.core.api.Condition) RemoteResourceException(org.jboss.pnc.client.RemoteResourceException) Assert(org.junit.Assert) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) Parameter(org.jboss.pnc.dto.response.Parameter) BuildConfigurationClient(org.jboss.pnc.client.BuildConfigurationClient) ContainerTest(org.jboss.pnc.test.category.ContainerTest) Test(org.junit.Test)

Aggregations

Instant (java.time.Instant)1 ArrayList (java.util.ArrayList)1 Collections (java.util.Collections)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Map (java.util.Map)1 Set (java.util.Set)1 UUID (java.util.UUID)1 Collectors (java.util.stream.Collectors)1 BadRequestException (javax.ws.rs.BadRequestException)1 ClientErrorException (javax.ws.rs.ClientErrorException)1 NotFoundException (javax.ws.rs.NotFoundException)1 Assertions (org.assertj.core.api.Assertions)1 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)1 Assertions.assertThatThrownBy (org.assertj.core.api.Assertions.assertThatThrownBy)1 Condition (org.assertj.core.api.Condition)1 Deployment (org.jboss.arquillian.container.test.api.Deployment)1 RunAsClient (org.jboss.arquillian.container.test.api.RunAsClient)1 Arquillian (org.jboss.arquillian.junit.Arquillian)1