示例#1
0
 public FCCEngine(
     ICoverletUtil coverletUtil,
     IOpenCoverUtil openCoverUtil,
     ICoberturaUtil coberturaUtil,
     IMsTestPlatformUtil msTestPlatformUtil,
     IReportGeneratorUtil reportGeneratorUtil,
     IProcessUtil processUtil,
     IAppOptionsProvider appOptionsProvider,
     ILogger logger,
     IAppDataFolder appDataFolder,
     [Import(typeof(SVsServiceProvider))]
     IServiceProvider serviceProvider
     )
 {
     this.coverletUtil        = coverletUtil;
     this.openCoverUtil       = openCoverUtil;
     this.coberturaUtil       = coberturaUtil;
     this.msTestPlatformUtil  = msTestPlatformUtil;
     this.reportGeneratorUtil = reportGeneratorUtil;
     this.processUtil         = processUtil;
     this.appOptionsProvider  = appOptionsProvider;
     this.logger          = logger;
     this.appDataFolder   = appDataFolder;
     this.serviceProvider = serviceProvider;
     colorThemeService    = serviceProvider.GetService(typeof(SVsColorThemeService));
 }
示例#2
0
 public FCCEngine(
     ICoverageUtilManager coverageUtilManager,
     ICoberturaUtil coberturaUtil,
     IMsTestPlatformUtil msTestPlatformUtil,
     IReportGeneratorUtil reportGeneratorUtil,
     ILogger logger,
     IAppDataFolder appDataFolder,
     ICoverageToolOutputManager coverageOutputManager,
     IMsCodeCoverageRunSettingsService msCodeCoverageRunSettingsService,
     ISolutionEvents solutionEvents,
     IAppOptionsProvider appOptionsProvider,
     IEventAggregator eventAggregator,
     IDisposeAwareTaskRunner disposeAwareTaskRunner
     )
 {
     this.solutionEvents                = solutionEvents;
     this.eventAggregator               = eventAggregator;
     this.disposeAwareTaskRunner        = disposeAwareTaskRunner;
     solutionEvents.AfterClosing       += (s, args) => ClearOutputWindow(false);
     appOptionsProvider.OptionsChanged += (appOptions) =>
     {
         if (!appOptions.Enabled)
         {
             ClearUI();
         }
     };
     this.coverageOutputManager = coverageOutputManager;
     this.coverageUtilManager   = coverageUtilManager;
     this.coberturaUtil         = coberturaUtil;
     this.msTestPlatformUtil    = msTestPlatformUtil;
     this.reportGeneratorUtil   = reportGeneratorUtil;
     this.logger        = logger;
     this.appDataFolder = appDataFolder;
     this.msCodeCoverageRunSettingsService = msCodeCoverageRunSettingsService;
 }
        public TestContainerDiscoverer
        (
            [Import(typeof(IOperationState))]
            IOperationState operationState,

            IFCCEngine fccEngine,
            IInitializer initializer,
            ITestOperationFactory testOperationFactory,
            ILogger logger,
            IAppOptionsProvider appOptionsProvider,
            IReportGeneratorUtil reportGeneratorUtil,
            IDisposeAwareTaskRunner disposeAwareTaskRunner,
            IMsCodeCoverageRunSettingsService msCodeCoverageRunSettingsService

        )
        {
            this.appOptionsProvider  = appOptionsProvider;
            this.reportGeneratorUtil = reportGeneratorUtil;
            this.msCodeCoverageRunSettingsService = msCodeCoverageRunSettingsService;
            this.fccEngine            = fccEngine;
            this.testOperationFactory = testOperationFactory;
            this.logger = logger;
            testOperationStateChangeHandlers = new Dictionary <TestOperationStates, Func <IOperation, Task> >
            {
                { TestOperationStates.TestExecutionCanceling, TestExecutionCancellingAsync },
                { TestOperationStates.TestExecutionStarting, TestExecutionStartingAsync },
                { TestOperationStates.TestExecutionFinished, TestExecutionFinishedAsync },
                { TestOperationStates.TestExecutionCancelAndFinished, TestExecutionCancelAndFinishedAsync },
            };

            disposeAwareTaskRunner.RunAsync(() =>
            {
                initializeTask = Task.Run(async() =>
                {
                    operationState.StateChanged += OperationState_StateChanged;
                    await initializer.InitializeAsync(disposeAwareTaskRunner.DisposalToken);
                });
                return(initializeTask);
            });
        }
示例#4
0
 public MsCodeCoverageRunSettingsService(
     IToolFolder toolFolder,
     IToolZipProvider toolZipProvider,
     IAppOptionsProvider appOptionsProvider,
     ICoverageToolOutputManager coverageOutputManager,
     IUserRunSettingsService userRunSettingsService,
     ITemplatedRunSettingsService templatedRunSettingsService,
     IShimCopier shimCopier,
     ILogger logger,
     IReportGeneratorUtil reportGeneratorUtil
     )
 {
     this.toolFolder            = toolFolder;
     this.toolZipProvider       = toolZipProvider;
     this.appOptionsProvider    = appOptionsProvider;
     this.coverageOutputManager = coverageOutputManager;
     this.shimCopier            = shimCopier;
     this.logger = logger;
     this.reportGeneratorUtil         = reportGeneratorUtil;
     this.userRunSettingsService      = userRunSettingsService;
     this.templatedRunSettingsService = templatedRunSettingsService;
 }