public void GetInstanceTest() { VSWindows_Accessor actual = VSWindows_Accessor.GetInstance(this.serviceProvider); Assert.IsNotNull(actual, "VSWindows.GetInstance() returned null."); Assert.AreEqual(this.serviceProvider, actual.serviceProvider, "Service provider was not set correctly"); }
public void OutputWindowPropertyTest() { // Setup Mock <Window> mockWindow = this.SetupMockWindow(); // Call VSWindows_Accessor actual = VSWindows_Accessor.GetInstance(this.serviceProvider); // Verify Assert.IsNotNull(actual.OutputWindow, "OutputWindow property was null"); }
public void OutputPanePropertyTest() { // Setup Mock <Window> mockWindow = this.SetupMockWindow(); Mock <OutputWindow> mockOutputWindow = new Mock <OutputWindow>(); mockWindow.ImplementExpr(w => w.Object, (EnvDTE.OutputWindow)mockOutputWindow.Instance); Mock <OutputWindowPane> mockOutputWindowPane = new Mock <OutputWindowPane>(); Mock <OutputWindowPanes> mockOutputWindowPanes = new Mock <OutputWindowPanes>(); mockOutputWindow.ImplementExpr(ow => ow.OutputWindowPanes, (EnvDTE.OutputWindowPanes)mockOutputWindowPanes.Instance); mockOutputWindowPanes.ImplementExpr(owp => owp.Add("StyleCop"), (EnvDTE.OutputWindowPane)mockOutputWindowPane.Instance); // Call VSWindows_Accessor actual = VSWindows_Accessor.GetInstance(this.serviceProvider); // Verify Assert.IsNotNull(actual.OutputPane, "OutputPane property was null"); }
public void DTEPropertyTest() { VSWindows_Accessor actual = VSWindows_Accessor.GetInstance(this.serviceProvider); Assert.IsNotNull(actual.DTE, "DTE property was null"); }