@Test public void validateMuleVersionAgainstEnvironmentMissingMuleVersionTest() throws DeploymentException { expectedException.expectMessage("muleVersion is not present in deployment configuration"); deploymentMock = createDeploymentMock(null); validator = new DeploymentValidatorMock(deploymentMock); validator.validateMuleVersionAgainstEnvironment(); }
public void validateMuleVersionAgainstEnvironment() throws DeploymentException { String deploymentMuleVersion = deployment.getMuleVersion().orElseThrow(deploymentExceptionSupplier); EnvironmentSupportedVersions environmentVersion = getEnvironmentSupportedVersions(); environmentVersion.supports(deploymentMuleVersion); }
AbstractDeploymentValidator { public void validateMuleVersionAgainstEnvironment() throws DeploymentException { String deploymentMuleVersion = deployment.getMuleVersion().orElseThrow(deploymentExceptionSupplier); EnvironmentSupportedVersions environmentVersion = getEnvironmentSupportedVersions(); environmentVersion.supports(deploymentMuleVersion); } }
AbstractDeploymentValidator { public void validateMuleVersionAgainstEnvironment() throws DeploymentException { String deploymentMuleVersion = deployment.getMuleVersion().orElseThrow(deploymentExceptionSupplier); EnvironmentSupportedVersions environmentVersion = getEnvironmentSupportedVersions(); environmentVersion.supports(deploymentMuleVersion); } AbstractDeploymentValidator(Deployment deployment); }
AbstractDeploymentValidator { public void validateMuleVersionAgainstEnvironment() throws DeploymentException { String deploymentMuleVersion = deployment.getMuleVersion().orElseThrow(deploymentExceptionSupplier); EnvironmentSupportedVersions environmentVersion = getEnvironmentSupportedVersions(); environmentVersion.supports(deploymentMuleVersion); } AbstractDeploymentValidator(Deployment deployment); void validateMuleVersionAgainstEnvironment(); abstract EnvironmentSupportedVersions getEnvironmentSupportedVersions(); }
AbstractDeploymentValidator { public void validateMuleVersionAgainstEnvironment() throws DeploymentException { String deploymentMuleVersion = deployment.getMuleVersion().orElseThrow(deploymentExceptionSupplier); EnvironmentSupportedVersions environmentVersion = getEnvironmentSupportedVersions(); environmentVersion.supports(deploymentMuleVersion); } AbstractDeploymentValidator(Deployment deployment); void validateMuleVersionAgainstEnvironment(); abstract EnvironmentSupportedVersions getEnvironmentSupportedVersions();  }