Exemple #1
0
        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");
        }
Exemple #2
0
        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");
        }
Exemple #3
0
        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");
        }
Exemple #4
0
        public void DTEPropertyTest()
        {
            VSWindows_Accessor actual = VSWindows_Accessor.GetInstance(this.serviceProvider);

            Assert.IsNotNull(actual.DTE, "DTE property was null");
        }