コード例 #1
0
 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>();
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: CallForAtlas/MuTest
        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);
            }
        }
コード例 #3
0
ファイル: MuTestRunner.cs プロジェクト: CallForAtlas/MuTest
        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);
        }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
ファイル: IoC_169.cs プロジェクト: n2cms/Castle.Windsor
		public Blackboard(IChalk chalk)
		{
		}
コード例 #6
0
 public ConsoleReportReporter(StrykerOptions strykerOptions, IChalk chalk = null)
 {
     _options = strykerOptions;
     _chalk   = chalk ?? new Chalk();
 }
コード例 #7
0
ファイル: DashboardReporter.cs プロジェクト: bakx/stryker-net
 public DashboardReporter(StrykerOptions options, IChalk chalk = null)
 {
     _options = options;
     _chalk   = chalk ?? new Chalk();
 }
コード例 #8
0
 public ConsoleReportReporter(IChalk chalk = null)
 {
     _chalk = chalk ?? new Chalk();
 }
コード例 #9
0
 public JsonReporter(StrykerOptions options, IFileSystem fileSystem = null, IChalk chalk = null)
 {
     _options    = options;
     _fileSystem = fileSystem ?? new FileSystem();
     _chalk      = chalk ?? new Chalk();
 }
コード例 #10
0
ファイル: IoC_169.cs プロジェクト: chandusekhar/LtePlatform
 public Blackboard(IChalk chalk)
 {
 }
コード例 #11
0
 public ConsoleDotProgressReporter(IChalk chalk = null)
 {
     _chalk = chalk ?? new Chalk();
 }
コード例 #12
0
ファイル: MuTestRunner.cs プロジェクト: mdaniyalkhan/MuTest
 public MuTestRunner(IChalk chalk, IFirebaseApiClient client)
 {
     _chalk  = chalk ?? throw new ArgumentNullException(nameof(chalk));
     _client = client ?? throw new ArgumentNullException(nameof(client));
 }
コード例 #13
0
ファイル: MutantAnalyzer.cs プロジェクト: mdaniyalkhan/MuTest
 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);
 }
コード例 #14
0
 public ClearTextTreeReporter(StrykerOptions strykerOptions, IChalk chalk = null)
 {
     _options = strykerOptions;
     _chalk   = chalk ?? new Chalk();
 }
コード例 #15
0
ファイル: Program.cs プロジェクト: mdaniyalkhan/MuTest
        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);
            }
        }