Example #1
0
        public void TestInitialize()
        {
            serviceProvider = new ConfigurableServiceProvider(false);

            host = new ConfigurableHost(serviceProvider, Dispatcher.CurrentDispatcher);
            var mefExport1 = MefTestHelpers.CreateExport <IHost>(host);

            activeSolutionTracker = new ConfigurableActiveSolutionTracker();
            var mefExport2 = MefTestHelpers.CreateExport <IActiveSolutionTracker>(activeSolutionTracker);

            var mefModel = ConfigurableComponentModel.CreateWithExports(mefExport1, mefExport2);

            serviceProvider.RegisterService(typeof(SComponentModel), mefModel, replaceExisting: true);

            solutionMock = new SolutionMock();
            serviceProvider.RegisterService(typeof(SVsSolution), solutionMock);

            errorListController = new ConfigurableErrorListInfoBarController();
            serviceProvider.RegisterService(typeof(IErrorListInfoBarController), errorListController);

            configProvider = new ConfigurableConfigurationProvider();
            serviceProvider.RegisterService(typeof(IConfigurationProviderService), configProvider);

            loggerMock = new Mock <ILogger>();

            vsMonitorMock = new Mock <IVsMonitorSelection>();
            vsMonitorMock
            .Setup(x => x.GetCmdUIContextCookie(ref BoundSolutionUIContext.Guid, out boundSolutionUIContextCookie))
            .Returns(VSConstants.S_OK);

            serviceProvider.RegisterService(typeof(SVsShellMonitorSelection), vsMonitorMock.Object, replaceExisting: true);
        }
        public void TestInitialize()
        {
            this.serviceProvider = new ConfigurableServiceProvider(false);
            this.host            = new ConfigurableHost(this.serviceProvider, Dispatcher.CurrentDispatcher);
            var mefExport1 = MefTestHelpers.CreateExport <IHost>(this.host);

            this.activeSolutionTracker = new ConfigurableActiveSolutionTracker();
            var mefExport2 = MefTestHelpers.CreateExport <IActiveSolutionTracker>(this.activeSolutionTracker);

            var mefModel = ConfigurableComponentModel.CreateWithExports(mefExport1, mefExport2);

            this.serviceProvider.RegisterService(typeof(SComponentModel), mefModel, replaceExisting: true);

            this.solutionMock = new SolutionMock();
            this.serviceProvider.RegisterService(typeof(SVsSolution), this.solutionMock);

            this.errorListController = new ConfigurableErrorListInfoBarController();
            this.serviceProvider.RegisterService(typeof(IErrorListInfoBarController), this.errorListController);

            this.solutionBindingInformationProvider = new ConfigurableSolutionBindingInformationProvider();
            this.serviceProvider.RegisterService(typeof(ISolutionBindingInformationProvider), this.solutionBindingInformationProvider);

            this.solutionBindingSerializer = new ConfigurableSolutionBindingSerializer();
            this.serviceProvider.RegisterService(typeof(ISolutionBindingSerializer), solutionBindingSerializer);

            this.sonarLintOutputMock = new Mock <ISonarLintOutput>();
        }
Example #3
0
        public void TestInitialize()
        {
            this.activeSolutionBoundTracker = new ConfigurableActiveSolutionBoundTracker();
            this.activeSolutionTracker      = new ConfigurableActiveSolutionTracker();
            var serviceProvider = new ConfigurableServiceProvider();

            this.projectSystemHelper = new ConfigurableVsProjectSystemHelper(serviceProvider);
            this.ruleSetProvider     = new ConfigurableSolutionRuleSetsInformationProvider();
            loggerMock = new Mock <ILogger>();
        }
        public void TestInitialize()
        {
            this.serviceProvider = new ConfigurableServiceProvider(false);
            this.host = new ConfigurableHost(this.serviceProvider, Dispatcher.CurrentDispatcher);
            var mefExport1 = MefTestHelpers.CreateExport<IHost>(this.host);

            this.activeSolutionTracker = new ConfigurableActiveSolutionTracker();
            var mefExport2 = MefTestHelpers.CreateExport<IActiveSolutionTracker>(this.activeSolutionTracker);

            var mefModel = ConfigurableComponentModel.CreateWithExports(mefExport1, mefExport2);

            this.serviceProvider.RegisterService(typeof(SComponentModel), mefModel, replaceExisting: true);

            this.solutionMock = new SolutionMock();
            this.serviceProvider.RegisterService(typeof(SVsSolution), this.solutionMock);

            this.errorListController = new ConfigurableErrorListInfoBarController();
            this.serviceProvider.RegisterService(typeof(IErrorListInfoBarController), this.errorListController);

            this.solutionBindingInformationProvider = new ConfigurableSolutionBindingInformationProvider();
            this.serviceProvider.RegisterService(typeof(ISolutionBindingInformationProvider), this.solutionBindingInformationProvider);
        }