public DiffMutantFilter(StrykerOptions options, IDiffProvider diffProvider = null, IBaselineProvider baselineProvider = null, IGitInfoProvider gitInfoProvider = null) { _logger = ApplicationLogging.LoggerFactory.CreateLogger <DiffMutantFilter>(); _options = options; _gitInfoProvider = gitInfoProvider ?? new GitInfoProvider(options); _baselineProvider = baselineProvider ?? BaselineProviderFactory.Create(options); if (options.CompareToDashboard) { _baseline = GetBaselineAsync().Result; } _diffResult = diffProvider.ScanDiff(); if (_diffResult != null) { _logger.LogInformation("{0} files changed", _diffResult.ChangedSourceFiles?.Count ?? 0 + _diffResult.ChangedTestFiles?.Count ?? 0); if (_diffResult.ChangedSourceFiles != null) { foreach (var changedFile in _diffResult.ChangedSourceFiles) { _logger.LogInformation("Changed file {0}", changedFile); } } if (_diffResult.ChangedTestFiles != null) { foreach (var changedFile in _diffResult.ChangedTestFiles) { _logger.LogInformation("Changed test file {0}", changedFile); } } } }
public DiffMutantFilter(StrykerOptions options, IDiffProvider diffProvider) { if (options.DiffEnabled) { _diffResult = diffProvider.ScanDiff(); } }
public DiffMutantFilter(IDiffProvider diffProvider = null) { _logger = ApplicationLogging.LoggerFactory.CreateLogger <DiffMutantFilter>(); _diffResult = diffProvider.ScanDiff(); if (_diffResult != null) { _logger.LogInformation("{0} files changed", _diffResult.ChangedSourceFiles?.Count ?? 0 + _diffResult.ChangedTestFiles?.Count ?? 0); if (_diffResult.ChangedSourceFiles != null) { foreach (var changedFile in _diffResult.ChangedSourceFiles) { _logger.LogInformation("Changed file {0}", changedFile); } } if (_diffResult.ChangedTestFiles != null) { foreach (var changedFile in _diffResult.ChangedTestFiles) { _logger.LogInformation("Changed test file {0}", changedFile); } } } }
public DiffMutantFilter(StrykerOptions options = null, IDiffProvider diffProvider = null, IDashboardClient dashboardClient = null, IGitInfoProvider branchProvider = null) { _logger = ApplicationLogging.LoggerFactory.CreateLogger <DiffMutantFilter>(); _dashboardClient = dashboardClient ?? new DashboardClient(options); _branchProvider = branchProvider ?? new GitInfoProvider(options); _options = options; if (options.CompareToDashboard) { _baseline = GetBaseline().Result; } _diffResult = diffProvider.ScanDiff(); if (_diffResult != null) { _logger.LogInformation("{0} files changed", _diffResult.ChangedFiles.Count); foreach (var changedFile in _diffResult.ChangedFiles) { _logger.LogInformation("Changed file {0}", changedFile); } } }
public DiffMutantFilter(IDiffProvider diffProvider) { _diffResult = diffProvider?.ScanDiff(); }