ProjectDeploymentValidator { public void isDeployable() throws ValidationException { if (projectInformation.isDeployment()) { validateIsDeployable(); } } ProjectDeploymentValidator(ProjectInformation projectInformation); ProjectInformation getDefaultProjectInformation(); void isDeployable();  }
@Test public void isDeployableMuleApplication() throws ValidationException { projectInformationBuilder .withPackaging(MULE_APPLICATION.toString()) .withClassifier(MULE_APPLICATION.toString()) .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test public void isDeployableMuleApplicationExample() throws ValidationException { projectInformationBuilder .withPackaging(MULE_APPLICATION.toString()) .withClassifier(MULE_APPLICATION_EXAMPLE.toString()) .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleApplicationTemplate() throws ValidationException { projectInformationBuilder .withPackaging(MULE_APPLICATION.toString()) .withClassifier(MULE_APPLICATION_TEMPLATE.toString()) .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMulePolicy() throws ValidationException { projectInformationBuilder .withPackaging(MULE_POLICY.toString()) .withClassifier(MULE_POLICY.toString()) .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test public void isDeployableMuleDomain() throws ValidationException { projectInformationBuilder .withPackaging(MULE_DOMAIN.toString()) .withClassifier(MULE_DOMAIN.toString()) .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleDomainBundle() throws ValidationException { projectInformationBuilder .withPackaging(MULE_DOMAIN_BUNDLE.toString()) .withClassifier(MULE_DOMAIN_BUNDLE.toString()) .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleApplicationFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-packaging") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_APPLICATION + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleApplicationLightPackageFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_APPLICATION + "-" + LIGHT_PACKAGE + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test public void isDeployableMuleApplicationLightPackageTestJarFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging(MULE_APPLICATION.toString()) .withClassifier(MULE_APPLICATION + "-" + LIGHT_PACKAGE) .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_APPLICATION + "-" + LIGHT_PACKAGE + "-" + TEST_JAR + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test public void isDeployableMuleApplicationTestJarFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging(MULE_APPLICATION.toString()) .withClassifier(MULE_APPLICATION + "-" + TEST_JAR) .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_APPLICATION + "-" + TEST_JAR + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test public void isDeployableMuleApplicationExampleFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging(MULE_APPLICATION_EXAMPLE.toString()) .withClassifier(MULE_APPLICATION_EXAMPLE.toString()) .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_APPLICATION_EXAMPLE + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test public void isDeployableMuleApplicationExampleLightPackageFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging(MULE_APPLICATION_EXAMPLE.toString()) .withClassifier(MULE_APPLICATION_EXAMPLE + "-" + LIGHT_PACKAGE) .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_APPLICATION_EXAMPLE + "-" + LIGHT_PACKAGE + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test public void isDeployableMuleApplicationExampleLightPackageTestJarFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging(MULE_APPLICATION_EXAMPLE.toString()) .withClassifier(MULE_APPLICATION_EXAMPLE + "-" + LIGHT_PACKAGE + "-" + TEST_JAR) .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_APPLICATION_EXAMPLE + "-" + LIGHT_PACKAGE + "-" + TEST_JAR + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test public void isDeployableMuleApplicationExampleTestJarFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging(MULE_APPLICATION_EXAMPLE.toString()) .withClassifier(MULE_APPLICATION_EXAMPLE + "-" + TEST_JAR) .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_APPLICATION_EXAMPLE + "-" + TEST_JAR + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleApplicationTemplateFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_APPLICATION_TEMPLATE + ".jar"; when(deploymentConfigurationMock.getPackaging()).thenReturn(MULE_APPLICATION_TEMPLATE.toString()); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleApplicationTemplateLightPackageFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_APPLICATION_TEMPLATE + "-" + LIGHT_PACKAGE + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleApplicationTemplateLightPackageTestJarFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_APPLICATION_TEMPLATE + "-" + LIGHT_PACKAGE + "-" + TEST_JAR + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleApplicationTemplateTestJarFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_APPLICATION_TEMPLATE + "-" + TEST_JAR + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleDomainFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier").isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_DOMAIN + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleDomainTemplateLightPackageFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_DOMAIN + "-" + LIGHT_PACKAGE + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleDomainLightPackageTestJarFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_DOMAIN + "-" + LIGHT_PACKAGE + "-" + TEST_JAR + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleDomainTestJarFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_DOMAIN + "-" + TEST_JAR + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleDomainBundleFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_DOMAIN_BUNDLE + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleDomainBundleTemplateLightPackageFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_DOMAIN_BUNDLE + "-" + LIGHT_PACKAGE + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleDomainBundleLightPackageTestJarFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_DOMAIN_BUNDLE + "-" + LIGHT_PACKAGE + "-" + TEST_JAR + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMuleDomainBundleTestJarFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_DOMAIN_BUNDLE + "-" + TEST_JAR + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMulePolicyFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_POLICY + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMulePolicyLightPackageFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_POLICY + "-" + LIGHT_PACKAGE + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMulePolicyLightPackageTestJarFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging("fake-packaging") .withClassifier("fake-classifier") .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); String artifactName = "my-project-" + MULE_POLICY + "-" + LIGHT_PACKAGE + "-" + TEST_JAR + ".jar"; when(deploymentConfigurationMock.getArtifact()).thenReturn(new File(artifactName)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }
@Test(expected = ValidationException.class) public void isDeployableMulePolicyTestJarFromArtifact() throws ValidationException { projectInformationBuilder .withPackaging(MULE_POLICY.toString()) .withClassifier(MULE_POLICY.toString()) .isDeployment(true) .withDeployments(singletonList(deploymentConfigurationMock)); validator = new ProjectDeploymentValidator(projectInformationBuilder.build()); validator.isDeployable(); }