@Test public void setDeploymentOneDeploymentNotNullTest() throws DeploymentException { mojoSpy.setAgentDeployment(null); mojoSpy.setArmDeployment(null); mojoSpy.setCloudHubDeployment(null); mojoSpy.setStandaloneDeployment(null); ClusterDeployment clusterDeploymentMock = mock(ClusterDeployment.class); doNothing().when(clusterDeploymentMock).setDefaultValues(projectMock); mojoSpy.setClusterDeployment(clusterDeploymentMock); assertThat("The resolved deployment is not the expected", mojoSpy.getDeploymentConfiguration(), equalTo(clusterDeploymentMock)); }
protected Deployment getDeploymentConfiguration() throws DeploymentException { List<Deployment> deployments = getProjectInformation().getDeployments().stream().filter(Objects::nonNull) .collect(Collectors.toList()); if (deployments.isEmpty()) { throw new DeploymentException("No deployment configuration was defined. Aborting."); } Deployment deploymentConfiguration = deployments.get(0); deploymentConfiguration.setDefaultValues(mavenProject); return deploymentConfiguration; }
AbstractMuleDeployerMojo extends AbstractGenericMojo { protected Deployment getDeploymentConfiguration() throws DeploymentException { List<Deployment> deployments = getProjectInformation().getDeployments().stream().filter(Objects::nonNull) .collect(Collectors.toList()); if (deployments.isEmpty()) { throw new DeploymentException("No deployment configuration was defined. Aborting."); } Deployment deploymentConfiguration = deployments.get(0); deploymentConfiguration.setDefaultValues(mavenProject); return deploymentConfiguration; } }
AbstractMuleDeployerMojo extends AbstractGenericMojo { protected Deployment getDeploymentConfiguration() throws DeploymentException { List<Deployment> deployments = getProjectInformation().getDeployments().stream().filter(Objects::nonNull) .collect(Collectors.toList()); if (deployments.isEmpty()) { throw new DeploymentException("No deployment configuration was defined. Aborting."); } Deployment deploymentConfiguration = deployments.get(0); deploymentConfiguration.setDefaultValues(mavenProject); return deploymentConfiguration; }  }
AbstractMuleDeployerMojo extends AbstractGenericMojo { protected Deployment getDeploymentConfiguration() throws DeploymentException { List<Deployment> deployments = getProjectInformation().getDeployments().stream().filter(Objects::nonNull) .collect(Collectors.toList()); if (deployments.isEmpty()) { throw new DeploymentException("No deployment configuration was defined. Aborting."); } Deployment deploymentConfiguration = deployments.get(0); deploymentConfiguration.setDefaultValues(mavenProject); return deploymentConfiguration; }  @Override void execute(); MavenResolverMetadata getMetadata(); void initializeAnypointDeploymentEnvironment(); }
AbstractMuleDeployerMojo extends AbstractGenericMojo { protected Deployment getDeploymentConfiguration() throws DeploymentException { List<Deployment> deployments = getProjectInformation().getDeployments().stream().filter(Objects::nonNull) .collect(Collectors.toList()); if (deployments.isEmpty()) { throw new DeploymentException("No deployment configuration was defined. Aborting."); } Deployment deploymentConfiguration = deployments.get(0); deploymentConfiguration.setDefaultValues(mavenProject); return deploymentConfiguration; }  @Override void execute(); MavenResolverMetadata getMetadata(); void initializeAnypointDeploymentEnvironment();  }