コード例 #1
0
ファイル: Data.cs プロジェクト: jorupp/ExportTestCases
 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
ファイル: Data.cs プロジェクト: jorupp/ExportTestCases
        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;
        }