// KnownUIContexts is not very friendly for testing, and requires this static properties
 static KnownUIContextsAccessor()
 {
     ServiceProvider = VsServiceProviderHelper.GlobalServiceProvider;
     MonitorSelectionService = new ConfigurableVsMonitorSelection();
     ServiceProvider.RegisterService(typeof(IVsMonitorSelection), MonitorSelectionService, true);
     Reset();
 }
 // KnownUIContexts is not very friendly for testing, and requires this static properties
 static KnownUIContextsAccessor()
 {
     ServiceProvider         = VsServiceProviderHelper.GlobalServiceProvider;
     MonitorSelectionService = new ConfigurableVsMonitorSelection();
     ServiceProvider.RegisterService(typeof(IVsMonitorSelection), MonitorSelectionService, true);
     Reset();
 }
Exemple #3
0
        public void TestInitialize()
        {
            this.monitorSelection = KnownUIContextsAccessor.MonitorSelectionService;

            this.serviceProvider = new ConfigurableServiceProvider();
            this.serviceProvider.RegisterService(typeof(DTE), this.dte = new DTEMock());
            this.serviceProvider.RegisterService(typeof(SComponentModel),
                                                 ConfigurableComponentModel.CreateWithExports(MefTestHelpers.CreateExport <ITelemetryLogger>(this.logger = new ConfigurableTelemetryLogger())));

            this.solutionRootFolder = Path.Combine(this.TestContext.TestRunDirectory, this.TestContext.TestName);
            this.dte.Solution       = new SolutionMock(dte, Path.Combine(this.solutionRootFolder, "solution.sln"));
        }
        public void TestInitialize()
        {
            this.monitorSelection = KnownUIContextsAccessor.MonitorSelectionService;

            this.serviceProvider = new ConfigurableServiceProvider();
            this.serviceProvider.RegisterService(typeof(DTE), this.dte = new DTEMock());
            this.serviceProvider.RegisterService(typeof(SComponentModel), 
                ConfigurableComponentModel.CreateWithExports(MefTestHelpers.CreateExport<ITelemetryLogger>(this.logger = new ConfigurableTelemetryLogger())));

            this.solutionRootFolder = Path.Combine(this.TestContext.TestRunDirectory, this.TestContext.TestName);
            this.dte.Solution = new SolutionMock(dte, Path.Combine(this.solutionRootFolder, "solution.sln"));
        }