public void Init() { AzureCPConfig configFromConfigDB = AzureCPConfig.GetConfiguration(UnitTestsHelper.ClaimsProviderConfigName, UnitTestsHelper.SPTrust.Name); // Create a local copy, otherwise changes will impact the whole process (even without calling Update method) Config = configFromConfigDB.CopyPersistedProperties(); // Reset configuration to test its default for the tests Config.ResetCurrentConfiguration(); }
public static void InitializeConfiguration(AzureCPConfig config) { config.ResetCurrentConfiguration(); #if DEBUG config.Timeout = 99999; #endif string json = File.ReadAllText(AzureTenantsJsonFile); List <AzureTenant> azureTenants = JsonConvert.DeserializeObject <List <AzureTenant> >(json); config.AzureTenants = azureTenants; config.Update(); }
public static void InitializeConfiguration(AzureCPConfig config) { config.ResetCurrentConfiguration(); #if DEBUG config.Timeout = 99999; #endif string json = File.ReadAllText(AzureTenantsJsonFile); List <AzureTenant> azureTenants = JsonConvert.DeserializeObject <List <AzureTenant> >(json); config.AzureTenants = azureTenants; config.Update(); Trace.WriteLine($"{DateTime.Now.ToString("s")} Set {config.AzureTenants.Count} Azure AD tenants to AzureCP configuration"); }