@Test public void should_generate_deployment_custom_content() { final DeploymentConfiguration deploymentConfiguration = DeploymentConfigurationPopulator.populate(new TestClass(ParametrizedConfigurationTest.class), archive).get(); softly.assertThat(deploymentConfiguration.getArchive()).isEqualTo(archive); softly.assertThat(deploymentConfiguration.getOverProtocol().value()).isEqualTo("https"); softly.assertThat(deploymentConfiguration.getDescriptor()).isNull(); softly.assertThat(deploymentConfiguration.getShouldThrowException()).isNull(); softly.assertThat(deploymentConfiguration.getTargets().value()).isEqualTo("container"); final Deployment deployment = deploymentConfiguration.getDeployment(); softly.assertThat(deployment.managed()).isFalse(); softly.assertThat(deployment.order()).isEqualTo(1); softly.assertThat(deployment.testable()).isFalse(); }
public static DeploymentConfiguration.DeploymentContentBuilder populate(TestClass testClass, Archive<?> archive) { DeploymentParameters deploymentParameters = resolveDeployment(testClass); DeploymentConfiguration.DeploymentContentBuilder deploymentContentBuilder = new DeploymentConfiguration.DeploymentContentBuilder(archive); final DeploymentConfiguration.DeploymentBuilder deploymentBuilder = deploymentContentBuilder.withDeployment() .withManaged(deploymentParameters.managed()) .withOrder(deploymentParameters.order()) .withTestable(deploymentParameters.testable()); if (isNotEmptyOrNull(deploymentParameters.deploymentName())) { deploymentBuilder.withName(deploymentParameters.deploymentName()); } deploymentContentBuilder = deploymentBuilder.build(); if (isNotEmptyOrNull(deploymentParameters.overProtocol())) { deploymentContentBuilder.withOverProtocol(deploymentParameters.overProtocol()); } if (isNotEmptyOrNull(deploymentParameters.targetsContainer())) { deploymentContentBuilder.withTargetsContainer(deploymentParameters.targetsContainer()); } if (deploymentParameters.shouldThrowExcetionClass() != IgnorePlaceholderException.class) { deploymentContentBuilder.withShouldThrowException(deploymentParameters.shouldThrowExcetionClass(), deploymentParameters.testable()); } return deploymentContentBuilder; }
DeploymentConfigurationPopulator { public static DeploymentConfiguration.DeploymentContentBuilder populate(TestClass testClass, Archive<?> archive) { DeploymentParameters deploymentParameters = resolveDeployment(testClass); DeploymentConfiguration.DeploymentContentBuilder deploymentContentBuilder = new DeploymentConfiguration.DeploymentContentBuilder(archive); final DeploymentConfiguration.DeploymentBuilder deploymentBuilder = deploymentContentBuilder.withDeployment() .withManaged(deploymentParameters.managed()) .withOrder(deploymentParameters.order()) .withTestable(deploymentParameters.testable()); if (isNotEmptyOrNull(deploymentParameters.deploymentName())) { deploymentBuilder.withName(deploymentParameters.deploymentName()); } deploymentContentBuilder = deploymentBuilder.build(); if (isNotEmptyOrNull(deploymentParameters.overProtocol())) { deploymentContentBuilder.withOverProtocol(deploymentParameters.overProtocol()); } if (isNotEmptyOrNull(deploymentParameters.targetsContainer())) { deploymentContentBuilder.withTargetsContainer(deploymentParameters.targetsContainer()); } if (deploymentParameters.shouldThrowExcetionClass() != IgnorePlaceholderException.class) { deploymentContentBuilder.withShouldThrowException(deploymentParameters.shouldThrowExcetionClass(), deploymentParameters.testable()); } return deploymentContentBuilder; } }
DeploymentConfigurationPopulator { public static DeploymentConfiguration.DeploymentContentBuilder populate(TestClass testClass, Archive<?> archive) { DeploymentParameters deploymentParameters = resolveDeployment(testClass); DeploymentConfiguration.DeploymentContentBuilder deploymentContentBuilder = new DeploymentConfiguration.DeploymentContentBuilder(archive); final DeploymentConfiguration.DeploymentBuilder deploymentBuilder = deploymentContentBuilder.withDeployment() .withManaged(deploymentParameters.managed()) .withOrder(deploymentParameters.order()) .withTestable(deploymentParameters.testable()); if (isNotEmptyOrNull(deploymentParameters.deploymentName())) { deploymentBuilder.withName(deploymentParameters.deploymentName()); } deploymentContentBuilder = deploymentBuilder.build(); if (isNotEmptyOrNull(deploymentParameters.overProtocol())) { deploymentContentBuilder.withOverProtocol(deploymentParameters.overProtocol()); } if (isNotEmptyOrNull(deploymentParameters.targetsContainer())) { deploymentContentBuilder.withTargetsContainer(deploymentParameters.targetsContainer()); } if (deploymentParameters.shouldThrowExcetionClass() != IgnorePlaceholderException.class) { deploymentContentBuilder.withShouldThrowException(deploymentParameters.shouldThrowExcetionClass(), deploymentParameters.testable()); } return deploymentContentBuilder; }  }
DeploymentConfigurationPopulator { public static DeploymentConfiguration.DeploymentContentBuilder populate(TestClass testClass, Archive<?> archive) { DeploymentParameters deploymentParameters = resolveDeployment(testClass); DeploymentConfiguration.DeploymentContentBuilder deploymentContentBuilder = new DeploymentConfiguration.DeploymentContentBuilder(archive); final DeploymentConfiguration.DeploymentBuilder deploymentBuilder = deploymentContentBuilder.withDeployment() .withManaged(deploymentParameters.managed()) .withOrder(deploymentParameters.order()) .withTestable(deploymentParameters.testable()); if (isNotEmptyOrNull(deploymentParameters.deploymentName())) { deploymentBuilder.withName(deploymentParameters.deploymentName()); } deploymentContentBuilder = deploymentBuilder.build(); if (isNotEmptyOrNull(deploymentParameters.overProtocol())) { deploymentContentBuilder.withOverProtocol(deploymentParameters.overProtocol()); } if (isNotEmptyOrNull(deploymentParameters.targetsContainer())) { deploymentContentBuilder.withTargetsContainer(deploymentParameters.targetsContainer()); } if (deploymentParameters.shouldThrowExcetionClass() != IgnorePlaceholderException.class) { deploymentContentBuilder.withShouldThrowException(deploymentParameters.shouldThrowExcetionClass(), deploymentParameters.testable()); } return deploymentContentBuilder; }  static DeploymentConfiguration.DeploymentContentBuilder populate(TestClass testClass, Archive<?> archive); }
DeploymentConfigurationPopulator { public static DeploymentConfiguration.DeploymentContentBuilder populate(TestClass testClass, Archive<?> archive) { DeploymentParameters deploymentParameters = resolveDeployment(testClass); DeploymentConfiguration.DeploymentContentBuilder deploymentContentBuilder = new DeploymentConfiguration.DeploymentContentBuilder(archive); final DeploymentConfiguration.DeploymentBuilder deploymentBuilder = deploymentContentBuilder.withDeployment() .withManaged(deploymentParameters.managed()) .withOrder(deploymentParameters.order()) .withTestable(deploymentParameters.testable()); if (isNotEmptyOrNull(deploymentParameters.deploymentName())) { deploymentBuilder.withName(deploymentParameters.deploymentName()); } deploymentContentBuilder = deploymentBuilder.build(); if (isNotEmptyOrNull(deploymentParameters.overProtocol())) { deploymentContentBuilder.withOverProtocol(deploymentParameters.overProtocol()); } if (isNotEmptyOrNull(deploymentParameters.targetsContainer())) { deploymentContentBuilder.withTargetsContainer(deploymentParameters.targetsContainer()); } if (deploymentParameters.shouldThrowExcetionClass() != IgnorePlaceholderException.class) { deploymentContentBuilder.withShouldThrowException(deploymentParameters.shouldThrowExcetionClass(), deploymentParameters.testable()); } return deploymentContentBuilder; }  static DeploymentConfiguration.DeploymentContentBuilder populate(TestClass testClass, Archive<?> archive);  }