コード例 #1
0
        public void OrganizationUri_InvalideSuiteUri_ThrowsConfigurationErrorsException(string suiteUri)
        {
            var task = new LogMvtResultsTask("task1", suiteUri, "");
            var ex   = Assert.Catch <ConfigurationErrorsException>(() => { var i = task.OrganizationUri; });

            Assert.That(ex.Message == "Test suite Uri is not correct, Organization Uri is not found.");
        }
コード例 #2
0
        public void LogMvtResultsTaskSectionTest_IsNotifiedMailSubjectExists_UpdateCheckFalse()
        {
            var section = new LogMvtResultsTaskSection();
            var task    = new LogMvtResultsTask("task1", "", "", null, false, 1); //tasks contains same id, so regards as update instead of add.

            section.TaskCollection.AddOrUpdate(task);
            Assert.IsFalse(section.IsNotifiedMailSubjectExists(task));
        }
コード例 #3
0
        public void LogMvtResultsTaskSectionTest_IsNotifiedMailSubjectExists_AddCheckTrue()
        {
            var section = new LogMvtResultsTaskSection();
            var task    = new LogMvtResultsTask("task1", "", "", null, false, 1);
            var task1   = new LogMvtResultsTask("task1", "", "", null, false, 2);

            section.TaskCollection.AddOrUpdate(task);
            Assert.IsTrue(section.IsNotifiedMailSubjectExists(task1));
        }
コード例 #4
0
        public void IsTaskNameExists_CheckSameIdTask_ReturnsFalse()
        {
            var section = new LogMvtResultsTaskSection();
            var task    = new LogMvtResultsTask("task1", "", "", null, false, 1); //tasks contains same id, so regards as update instead of add.

            section.TaskCollection.AddOrUpdate(task);

            Assert.IsFalse(section.IsTaskNameExists(task));
        }
コード例 #5
0
 public TaskRibbonGroup(LogMvtResultsRibbon addinRibbonTab, LogMvtResultsTask task = null)
 {
     _addinRibbonTab = addinRibbonTab;
     InitializeComponent();
     if (null == task)
     {
         task = new LogMvtResultsTask();
     }
     Task = task;
     UpdateGUI();
 }
コード例 #6
0
 public TaskSettingsDialog(LogMvtResultsRibbon addinRibbonTab, LogMvtResultsTask task)
 {
     _addinRibbonTab = addinRibbonTab;
     this.Task       = task;
     InitializeComponent();
     this.AcceptButton = this.OKPushButton;
     this.CancelButton = this.CancelPushButton;
     this.TaskNameTextBox.DataBindings.Add(nameof(TaskNameTextBox.Text), this.Task, nameof(Task.TaskName));
     this.NotifiedMailSubjectTextBox.DataBindings.Add(nameof(NotifiedMailSubjectTextBox.Text), this.Task, nameof(Task.NotifiedMailSubject));
     this.PersonalAccessTokenTextBox.DataBindings.Add(nameof(PersonalAccessTokenTextBox.Text), this.Task, nameof(Task.PersonalAccessToken));
     this.TestSutieUriTextBox.DataBindings.Add(nameof(TestSutieUriTextBox.Text), this.Task, nameof(Task.FullTestSuiteUri));
     this.AdditionalCommentTextBox.DataBindings.Add(nameof(AdditionalCommentTextBox.Text), this.Task, nameof(Task.AdditionalComment));
     this.ActivaedCheckBox.DataBindings.Add(nameof(ActivaedCheckBox.Checked), this.Task, nameof(Task.Activated));
     this.SchedualIntervalNumericUpDown.DataBindings.Add(nameof(SchedualIntervalNumericUpDown.Value), this.Task, nameof(Task.SchedualInterval));
     this.LogResolvedcheckBox.DataBindings.Add(nameof(LogResolvedcheckBox.Checked), this.Task, nameof(Task.LogPassOrKnownIssue));
 }
コード例 #7
0
 public bool IsNotifiedMailSubjectExists(LogMvtResultsTask task)
 {
     return(tasks.IsNotifiedMailSubjectExists(task));
 }
コード例 #8
0
 public bool IsTaskNameExists(LogMvtResultsTask task)
 {
     return(tasks.IsTaskNameExists(task));
 }
コード例 #9
0
        public void PlanId_InvalideSuiteUri_ThrowsFormatException(string suiteUri)
        {
            var task = new LogMvtResultsTask("task1", suiteUri, "");

            Assert.Catch <FormatException>(() => { var i = task.PlanId; });
        }
コード例 #10
0
        public void SuiteId_ValidTestSuiteUriWithEmbeddedRawOrEscapedWhiteSpace_ReturnsSuiteId(string suiteUri)
        {
            var task = new LogMvtResultsTask("task1", suiteUri, "");

            Assert.AreEqual(515999, task.SuiteId);
        }
コード例 #11
0
        public void PlanId_ValidTestSuiteUriWithoutWhiteSpace_ReturnsPlanId(string suiteUri)
        {
            var task = new LogMvtResultsTask("task1", suiteUri, "");

            Assert.AreEqual(415999, task.PlanId);
        }
コード例 #12
0
        public void ProjectName_ValidTestSuiteUriWithEmbeddedRawOrEscapedWhiteSpace_ReturnsProjectName(string suiteUri)
        {
            var task = new LogMvtResultsTask("task1", suiteUri, "");

            Assert.AreEqual("AspenTech Sandbox", task.ProjectName);
        }
コード例 #13
0
        public void OrganizationUrl_ValidAzureStyleSuiteUri_ReturnsOrganizationUri(string suiteUri)
        {
            var task = new LogMvtResultsTask("task1", suiteUri, "");

            Assert.AreEqual("https://dev.azure.com/aspentech-alm", task.OrganizationUri);
        }
コード例 #14
0
        public void OrganizationUrl_ValidVSStyleSuiteUri_ReturnsOrganizationUri(string suiteUri)
        {
            var task = new LogMvtResultsTask("task1", suiteUri, "");

            Assert.AreEqual("https://aspentech-alm.visualstudio.com", task.OrganizationUri);
        }
コード例 #15
0
        public void LIsValidTestSuiteUri_ValidSuiteUri_ReturnsTrue(string suiteUri)
        {
            var task = new LogMvtResultsTask("task1", suiteUri, "");

            Assert.IsTrue(task.IsValidTestSuiteUri());
        }