public override void SetALMConfigurations(string ALMServerUrl, bool UseRest, string ALMUserName, string ALMPassword, string ALMDomain, string ALMProject, string ALMProjectKey, GingerCoreNET.ALMLib.ALMIntegration.eALMType almType, string ALMConfigPackageFolderPath, GingerCoreNET.ALMLib.ALMIntegration.eTestingALMType testingALMType = GingerCoreNET.ALMLib.ALMIntegration.eTestingALMType.None) { GingerCoreNET.ALMLib.ALMConfig AlmConfig = ALMCore.AlmConfigs.FirstOrDefault(x => x.AlmType == almType); GingerCoreNET.ALMLib.ALMUserConfig CurrentAlmUserConfigurations = amdocs.ginger.GingerCoreNET.WorkSpace.Instance.UserProfile.ALMUserConfigs.FirstOrDefault(x => x.AlmType == almType); //if not exist add otherwise update if (AlmConfig == null) { AlmConfig = new GingerCoreNET.ALMLib.ALMConfig(); AlmConfigs.Add(AlmConfig); } AlmConfig.ALMServerURL = GetServerValueFromDict(GetDynamicServerConfigAndSetPaths()); AlmConfig.UseRest = UseRest; AlmConfig.ALMUserName = CurrentAlmUserConfigurations.ALMUserName; AlmConfig.ALMPassword = CurrentAlmUserConfigurations.ALMPassword; AlmConfig.ALMDomain = ALMDomain; AlmConfig.ALMProjectName = ALMProject; AlmConfig.ALMProjectKey = ALMProjectKey; AlmConfig.AlmType = almType; AlmConfig.ALMConfigPackageFolderPath = ALMConfigPackageFolderPath; AlmConfig.JiraTestingALM = testingALMType; }
private void RefreshJiraTestingALMList() { List <string> jiraTestingALMs = ALMIntegration.Instance.GetJiraTestingALMs(); GingerCoreNET.ALMLib.ALMIntegration.eTestingALMType currJiraTestingALM = CurrentAlmConfigurations.JiraTestingALM; JiraTestingALMComboBox.Items.Clear(); foreach (string jiraTestingALM in jiraTestingALMs) { JiraTestingALMComboBox.Items.Add(jiraTestingALM); } if (JiraTestingALMComboBox.Items.Count > 0) { if (JiraTestingALMComboBox.Items.Contains(currJiraTestingALM.ToString())) { CurrentAlmConfigurations.JiraTestingALM = currJiraTestingALM; JiraTestingALMComboBox.SelectedIndex = JiraTestingALMComboBox.Items.IndexOf(CurrentAlmConfigurations.JiraTestingALM.ToString()); } if (JiraTestingALMComboBox.SelectedIndex == -1) { JiraTestingALMComboBox.SelectedIndex = 0; } } }
public virtual void SetALMConfigurations(string ALMServerUrl, bool UseRest, string ALMUserName, string ALMPassword, string ALMDomain, string ALMProject, string ALMProjectKey, GingerCoreNET.ALMLib.ALMIntegration.eALMType almType, string ALMConfigPackageFolderPath, GingerCoreNET.ALMLib.ALMIntegration.eTestingALMType jiraTestingALM = GingerCoreNET.ALMLib.ALMIntegration.eTestingALMType.None) { GingerCoreNET.ALMLib.ALMConfig AlmConfig = ALMCore.AlmConfigs.FirstOrDefault(x => x.AlmType == almType); if (AlmConfig == null) { AlmConfig = new GingerCoreNET.ALMLib.ALMConfig(); AlmConfigs.Add(AlmConfig); } GingerCoreNET.ALMLib.ALMUserConfig CurrentAlmUserConfigurations = WorkSpace.Instance.UserProfile.ALMUserConfigs.FirstOrDefault(x => x.AlmType == almType); if (CurrentAlmUserConfigurations == null) { CurrentAlmUserConfigurations = new GingerCoreNET.ALMLib.ALMUserConfig(); CurrentAlmUserConfigurations.AlmType = almType; WorkSpace.Instance.UserProfile.ALMUserConfigs.Add(CurrentAlmUserConfigurations); } if (AlmConfig == null) { AlmConfig = new GingerCoreNET.ALMLib.ALMConfig(); AlmConfigs.Add(AlmConfig); } AlmConfig.ALMServerURL = ALMServerUrl; AlmConfig.UseRest = UseRest; AlmConfig.ALMUserName = CurrentAlmUserConfigurations.ALMUserName; AlmConfig.ALMPassword = CurrentAlmUserConfigurations.ALMPassword; AlmConfig.ALMDomain = ALMDomain; AlmConfig.ALMProjectName = ALMProject; AlmConfig.ALMProjectKey = ALMProjectKey; AlmConfig.AlmType = almType; AlmConfig.JiraTestingALM = jiraTestingALM; if (!String.IsNullOrEmpty(ALMConfigPackageFolderPath)) { AlmConfig.ALMConfigPackageFolderPath = ALMConfigPackageFolderPath; } }