@Test public void getEnvironmentSupportedVersionsTest() throws Exception { armDeployment.setUri(BASE_URI); armDeployment.setArmInsecure(true); validatorSpy = spy(new ArmDeploymentValidator(armDeployment)); ArmClient clientSpy = spy(new ArmClient(armDeployment, LOG_MOCK)); doReturn(clientSpy).when(validatorSpy, "getArmClient"); doReturn(newArrayList(MULE_VERSION)).when(validatorSpy, "findRuntimeVersion", clientSpy); assertThat("Supported version that was generated is not the expected", validatorSpy.getEnvironmentSupportedVersions(), equalTo(EXPECTED_ENVIRONMENT_SUPPORTED_VERSIONS)); }
@Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { ArmClient client = getArmClient(); List<String> muleRuntimeVersion = findRuntimeVersion(client); if (muleRuntimeVersion.isEmpty()) { throw new DeploymentException("There are no runtime available in this server or serverGroup"); } return new EnvironmentSupportedVersions(muleRuntimeVersion); }
ArmDeploymentValidator extends AbstractDeploymentValidator { @Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { ArmClient client = getArmClient(); List<String> muleRuntimeVersion = findRuntimeVersion(client); if (muleRuntimeVersion.isEmpty()) { throw new DeploymentException("There are no runtime available in this server or serverGroup"); } return new EnvironmentSupportedVersions(muleRuntimeVersion); } }
ArmDeploymentValidator extends AbstractDeploymentValidator { @Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { ArmClient client = getArmClient(); List<String> muleRuntimeVersion = findRuntimeVersion(client); if (muleRuntimeVersion.isEmpty()) { throw new DeploymentException("There are no runtime available in this server or serverGroup"); } return new EnvironmentSupportedVersions(muleRuntimeVersion); } ArmDeploymentValidator(Deployment deployment); }
ArmDeploymentValidator extends AbstractDeploymentValidator { @Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { ArmClient client = getArmClient(); List<String> muleRuntimeVersion = findRuntimeVersion(client); if (muleRuntimeVersion.isEmpty()) { throw new DeploymentException("There are no runtime available in this server or serverGroup"); } return new EnvironmentSupportedVersions(muleRuntimeVersion); } ArmDeploymentValidator(Deployment deployment); @Override EnvironmentSupportedVersions getEnvironmentSupportedVersions(); }
ArmDeploymentValidator extends AbstractDeploymentValidator { @Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { ArmClient client = getArmClient(); List<String> muleRuntimeVersion = findRuntimeVersion(client); if (muleRuntimeVersion.isEmpty()) { throw new DeploymentException("There are no runtime available in this server or serverGroup"); } return new EnvironmentSupportedVersions(muleRuntimeVersion); } ArmDeploymentValidator(Deployment deployment); @Override EnvironmentSupportedVersions getEnvironmentSupportedVersions();  }