Exemple #1
0
        public FsharpMutationProcess(MutationTestInput mutationTestInput,
                                     BaseMutantOrchestrator <FSharpList <SynModuleOrNamespace> > orchestrator = null,
                                     IFileSystem fileSystem = null,
                                     StrykerOptions options = null)
        {
            MutationTestInput input = mutationTestInput;

            _projectInfo = (ProjectComponent <ParsedInput>)input.ProjectInfo.ProjectContents;

            _options          = options;
            _orchestrator     = orchestrator ?? new FsharpMutantOrchestrator(options: _options);
            _compilingProcess = new FsharpCompilingProcess(mutationTestInput, new RollbackProcess(), fileSystem ?? new FileSystem());
            _logger           = ApplicationLogging.LoggerFactory.CreateLogger <MutationTestProcess>();
        }
Exemple #2
0
        public CsharpMutationProcess(MutationTestInput mutationTestInput,
                                     IFileSystem fileSystem     = null,
                                     StrykerOptions options     = null,
                                     IMutantFilter mutantFilter = null,
                                     BaseMutantOrchestrator <SyntaxNode> orchestrator = null)
        {
            _input            = mutationTestInput;
            _projectInfo      = (ProjectComponent <SyntaxTree>)mutationTestInput.ProjectInfo.ProjectContents;
            _options          = options;
            _orchestrator     = orchestrator ?? new CsharpMutantOrchestrator(options: _options);
            _compilingProcess = new CsharpCompilingProcess(mutationTestInput, new RollbackProcess());
            _fileSystem       = fileSystem ?? new FileSystem();
            _logger           = ApplicationLogging.LoggerFactory.CreateLogger <MutationTestProcess>();

            _mutantFilter = mutantFilter ?? MutantFilterFactory.Create(options, _input);
        }
        public MutationTestProcess(MutationTestInput mutationTestInput,
                                   IReporter reporter,
                                   IMutationTestExecutor mutationTestExecutor,
                                   BaseMutantOrchestrator <SyntaxNode> cSharpOrchestrator = null,
                                   BaseMutantOrchestrator <FSharpList <SynModuleOrNamespace> > fSharpOrchestrator = null,
                                   IFileSystem fileSystem             = null,
                                   IMutantFilter mutantFilter         = null,
                                   ICoverageAnalyser coverageAnalyser = null,
                                   StrykerOptions options             = null)
        {
            Input                 = mutationTestInput;
            _projectContents      = mutationTestInput.ProjectInfo.ProjectContents;
            _reporter             = reporter;
            _options              = options;
            _mutationTestExecutor = mutationTestExecutor;
            _fileSystem           = fileSystem ?? new FileSystem();
            _logger               = ApplicationLogging.LoggerFactory.CreateLogger <MutationTestProcess>();
            _coverageAnalyser     = coverageAnalyser ?? new CoverageAnalyser(_options, _mutationTestExecutor, Input);
            _language             = Input.ProjectInfo.ProjectUnderTestAnalyzerResult.GetLanguage();
            _orchestrator         = cSharpOrchestrator ?? fSharpOrchestrator ?? ChooseOrchestrator(_options);

            SetupMutationTestProcess(mutantFilter);
        }