示例#1
0
 internal void SaveSettings(Settings settings)
 {
     settings.TfsUrl = SelectedProject.WitProject.Store.TeamProjectCollection.Uri.AbsoluteUri;
     settings.ProjectName = SelectedProject.TeamProjectName;
     settings.TestPlan = SelectedTestPlan.Name;
     settings.TestSuite = SelectedTestSuite.Title;
     settings.ExportFilename = ExportFileName;
     settings.Save();
 }
示例#2
0
        internal void LoadFromSettings(Settings settings)
        {
            if (string.IsNullOrEmpty(settings.TfsUrl) || string.IsNullOrEmpty(settings.ProjectName))
                return;
            var tfs = new TfsTeamProjectCollection(new Uri(settings.TfsUrl));
            SelectedProject = tfs.GetService<ITestManagementService>().GetTeamProject(settings.ProjectName);

            while(_pendingTasks.Count > 0)
                Application.DoEvents();

            if (string.IsNullOrEmpty(settings.TestPlan))
                return;

            SelectedTestPlan = TestPlans.SingleOrDefault(i => i.Name == settings.TestPlan);

            while (_pendingTasks.Count > 0)
                Application.DoEvents();

            if (string.IsNullOrEmpty(settings.TestSuite))
                return;

            SelectedTestSuite = TestSuites.SingleOrDefault(i => i.Title == settings.TestSuite);
            ExportFileName = settings.ExportFilename;
        }