public DashboardReporter(StrykerOptions options, IDashboardClient dashboardClient = null, ILogger <DashboardReporter> logger = null, IChalk chalk = null) { _options = options; _dashboardClient = dashboardClient ?? new DashboardClient(options); _logger = logger ?? ApplicationLogging.LoggerFactory.CreateLogger <DashboardReporter>(); _chalk = chalk ?? new Chalk(); _logger = ApplicationLogging.LoggerFactory.CreateLogger <DashboardReporter>(); }
private static int Main(string[] args) { try { _chalk = new Chalk(); Trace.Listeners.Add(new EventLogTraceListener("MuTest_CPP_CLI")); _muTest = new MuTestRunner(_chalk, new CppDirectoryFactory()); var app = new MuTestCli(_muTest); CancelKeyPress += CancelMutationHandler; AppDomain.CurrentDomain.ProcessExit += CancelMutationHandler; return(app.Run(args)); } catch (MuTestInputException ex) { ShowMessage(ex); CancelMutation(); return(1); } catch (CommandParsingException ex) { _chalk.Red(ex.Message); CancelMutation(); return(1); } catch (Exception ex) { CancelMutation(); var innerException = ex.InnerException; if (innerException != null && (innerException.GetType() == typeof(MuTestInputException) || innerException.GetType().BaseType == typeof(MuTestInputException))) { ShowMessage((MuTestInputException)innerException); var statusCode = MuTestExceptions[innerException.GetType()]; _chalk.Red($"\nStatus Code: {statusCode}\n"); return(statusCode); } if (ex.Message.StartsWith("Unrecognized option")) { _chalk.Default($"{ex.Message}{Environment.NewLine}"); return(1); } Trace.TraceError("{0}", ex); _chalk.Red($"\n{ex.Message} - review trace for more details\n"); return(1); } }
public MuTestRunner( IChalk chalk, ICppDirectoryFactory directoryFactory, IMutantSelector mutantsSelector = null, IAridNodeMutantFilterer aridNodeMutantFilterer = null) { _chalk = chalk; DirectoryFactory = directoryFactory; _mutantsSelector = mutantsSelector ?? new MutantSelector(); var aridNodeFilterProvider = new AridNodeFilterProvider(); _aridNodeMutantFilterer = aridNodeMutantFilterer ?? new AridNodeMutantFilterer(aridNodeFilterProvider); }
private static void WriteClassificationToConsole( IAnalyzableNode @class, NodesClassification classification, IChalk chalk) { foreach (var node in @class.DescendantNodesAndSelf()) { var result = classification.GetResult(node); if (result.IsArid) { chalk.Magenta($"ARID {node.Kind()}"); } else { chalk.Green($"NON-ARID {node.Kind()}"); } chalk.Default(node.GetText()); chalk.Default(Environment.NewLine + Environment.NewLine); } }
public Blackboard(IChalk chalk) { }
public ConsoleReportReporter(StrykerOptions strykerOptions, IChalk chalk = null) { _options = strykerOptions; _chalk = chalk ?? new Chalk(); }
public DashboardReporter(StrykerOptions options, IChalk chalk = null) { _options = options; _chalk = chalk ?? new Chalk(); }
public ConsoleReportReporter(IChalk chalk = null) { _chalk = chalk ?? new Chalk(); }
public JsonReporter(StrykerOptions options, IFileSystem fileSystem = null, IChalk chalk = null) { _options = options; _fileSystem = fileSystem ?? new FileSystem(); _chalk = chalk ?? new Chalk(); }
public ConsoleDotProgressReporter(IChalk chalk = null) { _chalk = chalk ?? new Chalk(); }
public MuTestRunner(IChalk chalk, IFirebaseApiClient client) { _chalk = chalk ?? throw new ArgumentNullException(nameof(chalk)); _client = client ?? throw new ArgumentNullException(nameof(client)); }
public MutantAnalyzer(IChalk chalk, MuTestSettings settings) { _chalk = chalk ?? throw new ArgumentNullException(nameof(chalk)); _settings = settings ?? throw new ArgumentNullException(nameof(settings)); _useClassFilterTestsThreshold = Convert.ToInt32(settings.UseClassFilterTestsThreshold); }
public ClearTextTreeReporter(StrykerOptions strykerOptions, IChalk chalk = null) { _options = strykerOptions; _chalk = chalk ?? new Chalk(); }
private static int Main(string[] args) { try { _chalk = new Chalk(); Trace.Listeners.Add(new EventLogTraceListener("MuTest_CPP_CLI")); var services = new ServiceCollection(); services .AddHttpClient <IFirebaseApiClient, FirebaseApiClient>() .AddPolicyHandler(GetRetryPolicy()) .AddPolicyHandler(GetCircuitBreakerPatternPolicy()); services.AddSingleton(_chalk); var provider = services.BuildServiceProvider(); var factory = provider.GetService <IHttpClientFactory>(); _muTest = new MuTestRunner( _chalk, new CppDirectoryFactory(), new FirebaseApiClient( factory.CreateClient(), MuTestSettings.FireBaseDatabaseApiUrl, MuTestSettings.FireBaseStorageApiUrl)); var app = new MuTestCli(_muTest); CancelKeyPress += CancelMutationHandler; AppDomain.CurrentDomain.ProcessExit += CancelMutationHandler; return(app.Run(args)); } catch (MuTestInputException ex) { ShowMessage(ex); CancelMutation(); return(1); } catch (CommandParsingException ex) { _chalk.Red(ex.Message); CancelMutation(); return(1); } catch (Exception ex) { CancelMutation(); var innerException = ex.InnerException; if (innerException != null && (innerException.GetType() == typeof(MuTestInputException) || innerException.GetType().BaseType == typeof(MuTestInputException))) { ShowMessage((MuTestInputException)innerException); var statusCode = MuTestExceptions[innerException.GetType()]; _chalk.Red($"\nStatus Code: {statusCode}\n"); return(statusCode); } if (ex.Message.StartsWith("Unrecognized option")) { _chalk.Default($"{ex.Message}{Environment.NewLine}"); return(1); } Trace.TraceError("{0}", ex); _chalk.Red($"\n{ex.Message} - review trace for more details\n"); return(1); } }