@Test public void testHAServer() { underTest.setParameters(request, SdxDatabaseAvailabilityType.HA); verify(request).setAzure(captor.capture()); AzureDatabaseServerV4Parameters azureDatabaseServerV4Parameters = captor.getValue(); assertEquals(true, azureDatabaseServerV4Parameters.getGeoRedundantBackup()); assertEquals(30, azureDatabaseServerV4Parameters.getBackupRetentionDays()); }
@Override public void setParameters(DatabaseServerV4StackRequest request, SdxDatabaseAvailabilityType availabilityType) { AzureDatabaseServerV4Parameters parameters = new AzureDatabaseServerV4Parameters(); if (SdxDatabaseAvailabilityType.HA.equals(availabilityType)) { parameters.setBackupRetentionDays(backupRetentionPeriodHa); parameters.setGeoRedundantBackup(geoRedundantBackupHa); } else if (SdxDatabaseAvailabilityType.NON_HA.equals(availabilityType)) { parameters.setBackupRetentionDays(backupRetentionPeriodNonHa); parameters.setGeoRedundantBackup(geoRedundantBackupNonHa); } else { throw new IllegalArgumentException(availabilityType + " database availability type is not supported on Azure."); } request.setAzure(parameters); }
AzureDatabaseServerParameterSetter implements DatabaseServerParameterSetter { @Override public void setParameters(DatabaseServerV4StackRequest request, SdxDatabaseAvailabilityType availabilityType) { AzureDatabaseServerV4Parameters parameters = new AzureDatabaseServerV4Parameters(); if (SdxDatabaseAvailabilityType.HA.equals(availabilityType)) { parameters.setBackupRetentionDays(backupRetentionPeriodHa); parameters.setGeoRedundantBackup(geoRedundantBackupHa); } else if (SdxDatabaseAvailabilityType.NON_HA.equals(availabilityType)) { parameters.setBackupRetentionDays(backupRetentionPeriodNonHa); parameters.setGeoRedundantBackup(geoRedundantBackupNonHa); } else { throw new IllegalArgumentException(availabilityType + " database availability type is not supported on Azure."); } request.setAzure(parameters); } }
AzureDatabaseServerParameterSetter implements DatabaseServerParameterSetter { @Override public void setParameters(DatabaseServerV4StackRequest request, SdxDatabaseAvailabilityType availabilityType) { AzureDatabaseServerV4Parameters parameters = new AzureDatabaseServerV4Parameters(); if (SdxDatabaseAvailabilityType.HA.equals(availabilityType)) { parameters.setBackupRetentionDays(backupRetentionPeriodHa); parameters.setGeoRedundantBackup(geoRedundantBackupHa); } else if (SdxDatabaseAvailabilityType.NON_HA.equals(availabilityType)) { parameters.setBackupRetentionDays(backupRetentionPeriodNonHa); parameters.setGeoRedundantBackup(geoRedundantBackupNonHa); } else { throw new IllegalArgumentException(availabilityType + " database availability type is not supported on Azure."); } request.setAzure(parameters); }  }
AzureDatabaseServerParameterSetter implements DatabaseServerParameterSetter { @Override public void setParameters(DatabaseServerV4StackRequest request, SdxDatabaseAvailabilityType availabilityType) { AzureDatabaseServerV4Parameters parameters = new AzureDatabaseServerV4Parameters(); if (SdxDatabaseAvailabilityType.HA.equals(availabilityType)) { parameters.setBackupRetentionDays(backupRetentionPeriodHa); parameters.setGeoRedundantBackup(geoRedundantBackupHa); } else if (SdxDatabaseAvailabilityType.NON_HA.equals(availabilityType)) { parameters.setBackupRetentionDays(backupRetentionPeriodNonHa); parameters.setGeoRedundantBackup(geoRedundantBackupNonHa); } else { throw new IllegalArgumentException(availabilityType + " database availability type is not supported on Azure."); } request.setAzure(parameters); }  @Override void setParameters(DatabaseServerV4StackRequest request, SdxDatabaseAvailabilityType availabilityType); @Override CloudPlatform getCloudPlatform(); }
AzureDatabaseServerParameterSetter implements DatabaseServerParameterSetter { @Override public void setParameters(DatabaseServerV4StackRequest request, SdxDatabaseAvailabilityType availabilityType) { AzureDatabaseServerV4Parameters parameters = new AzureDatabaseServerV4Parameters(); if (SdxDatabaseAvailabilityType.HA.equals(availabilityType)) { parameters.setBackupRetentionDays(backupRetentionPeriodHa); parameters.setGeoRedundantBackup(geoRedundantBackupHa); } else if (SdxDatabaseAvailabilityType.NON_HA.equals(availabilityType)) { parameters.setBackupRetentionDays(backupRetentionPeriodNonHa); parameters.setGeoRedundantBackup(geoRedundantBackupNonHa); } else { throw new IllegalArgumentException(availabilityType + " database availability type is not supported on Azure."); } request.setAzure(parameters); }  @Override void setParameters(DatabaseServerV4StackRequest request, SdxDatabaseAvailabilityType availabilityType); @Override CloudPlatform getCloudPlatform();  }