/// <summary> /// <see cref="IErrorNotificationManager.RemoveNotifier"/> /// </summary> /// <param name="notifier">An existing instance of <see cref="IProgressErrorNotifier"/></param> public void RemoveNotifier(IProgressErrorNotifier notifier) { if (notifier == null) { throw new ArgumentNullException(nameof(notifier)); } lock (this.notifiersLock) { this.notifiers.Remove(notifier); } }
public void VsOutputWindowPaneNotifier_MessageOnly() { // Arrange bool logFullException = true; bool ensureOutputVisible = false; StubVsOutputWindowPane outputPane = this.CreateOutputPane(logFullException); StubVsUIShell.StubWindowFrame frame = this.CreateAndRegisterFrame(); IProgressErrorNotifier testSubject = this.CreateTestSubject(outputPane, ensureOutputVisible, logFullException); // Act testSubject.Notify(this.expectedException); // Assert frame.WasShown.Should().BeFalse(); outputPane.IsActivated.Should().BeFalse(); outputPane.IsWrittenToOutputWindow.Should().BeTrue(); }
public void VsOutputWindowPaneNotifier_FullException() { // Setup bool logFullException = true; bool ensureOutputVisible = false; StubVsOutputWindowPane outputPane = this.CreateOutputPane(logFullException); StubVsUIShell.StubWindowFrame frame = this.CreateAndRegisterFrame(); IProgressErrorNotifier testSubject = this.CreateTestSubject(outputPane, ensureOutputVisible, logFullException); // Execute testSubject.Notify(this.expectedException); // Verify frame.AssertNotShown(); outputPane.AssertNotActivated(); outputPane.AssertWrittenToOutputWindow(); }