public ServerInfrastructureSettings GetInfrastructure() { _client.Executor.CheckApiServerVersion(); IRestRequest request = _client.Builder.GetInfrastructureSettings(); ApiInfrastructureSettings apiInfrastructureSettings = _client.Executor.DoSyncApiCall <ApiInfrastructureSettings>(request, DracoonRequestExecutor.RequestType.GetInfrastructureSettings); return(SettingsMapper.FromApiInfrastructureSettings(apiInfrastructureSettings)); }
public void FromApiInfrastructureSettings_Null() { // ARRANGE ServerInfrastructureSettings expected = null; ApiInfrastructureSettings param = null; // ACT ServerInfrastructureSettings actual = SettingsMapper.FromApiInfrastructureSettings(param); // ASSERT Assert.Equal(expected, actual, new ServerInfrastructureSettingsComparer()); }
internal static ServerInfrastructureSettings FromApiInfrastructureSettings(ApiInfrastructureSettings apiInfrastructureConfig) { if (apiInfrastructureConfig == null) { return(null); } ServerInfrastructureSettings infrastructure = new ServerInfrastructureSettings { MediaServerConfigEnabled = apiInfrastructureConfig.MediaServerConfigEnabled, S3DefaultRegion = apiInfrastructureConfig.S3DefaultRegion, SmsConfigEnabled = apiInfrastructureConfig.SmsConfigEnabled, S3EnforceDirectUpload = apiInfrastructureConfig.S3EnforceDirectUpload }; return(infrastructure); }
public void FromApiInfrastructureSettings() { // ARRANGE ServerInfrastructureSettings expected = FactoryServerSettings.ServerInfrastructureSettings; ApiInfrastructureSettings param = new ApiInfrastructureSettings { MediaServerConfigEnabled = expected.MediaServerConfigEnabled, S3DefaultRegion = expected.S3DefaultRegion, SmsConfigEnabled = expected.SmsConfigEnabled, S3EnforceDirectUpload = expected.S3EnforceDirectUpload }; // ACT ServerInfrastructureSettings actual = SettingsMapper.FromApiInfrastructureSettings(param); // ASSERT Assert.Equal(expected, actual, new ServerInfrastructureSettingsComparer()); }