Test helper class that verifies the message formating
예제 #1
0
 private StubVsOutputWindowPane CreateOutputPane(bool logFullException)
 {
     return(new StubVsOutputWindowPane
     {
         OutputStringThreadSafeAction = (actualMessage) =>
         {
             string expectedFormat = this.CreateTestMessageFormat() + Environment.NewLine;
             MessageVerificationHelper.VerifyNotificationMessage(actualMessage, expectedFormat, this.expectedException, logFullException);
         }
     });
 }
 private Exception Setup(bool logWholeMessage)
 {
     string format = this.TestContext.TestName + "{0}";
     string source = this.TestContext.TestName;
     this.testSubject = new VsActivityLogNotifier(this.serviceProvider, source, format, logWholeMessage);
     Exception ex = this.GenerateException();
     this.activityLog.LogEntryAction = (entryType, actualSource, actualMessage) =>
     {
         Assert.AreEqual((uint)__ACTIVITYLOG_ENTRYTYPE.ALE_ERROR, entryType, "Unexpected entry type");
         Assert.AreEqual(source, actualSource, "Unexpected entry source");
         MessageVerificationHelper.VerifyNotificationMessage(actualMessage, format, ex, logWholeMessage);
     };
     return ex;
 }
예제 #3
0
        private Exception Setup(bool logWholeMessage)
        {
            string format = this.TestContext.TestName + "{0}";
            string title  = this.TestContext.TestName;

            this.testSubject = new VsMessageBoxNotifier(this.serviceProvider, title, format, logWholeMessage);
            Exception ex = this.GenerateException();

            this.uiSHell.ShowMessageBoxAction = (actualTitle, actualMessage) =>
            {
                actualTitle.Should().Be(title, "Unexpected message box title");
                MessageVerificationHelper.VerifyNotificationMessage(actualMessage, format, ex, logWholeMessage);
            };
            return(ex);
        }