public static IEnumerable <Mutant> GetDefaultMutants(SyntaxNode node, ClassDeclaration classDeclaration) { var orchestrator = new MutantOrchestrator(DefaultMutators); var analysis = SyntaxNodeAnalysisFactory.Create(node, classDeclaration); orchestrator.Mutate(analysis); return(orchestrator.GetLatestMutantBatch()); }
private IList <Mutant> GetMethodMutants(string method) { var methodSyntax = _class .DescendantNodes <MethodDeclarationSyntax>() .FirstOrDefault(x => x.MethodName() == method); if (methodSyntax != null) { var mutantOrchestrator = new MutantOrchestrator(); var syntaxNodeAnalysisFactory = new SyntaxNodeAnalysisFactory(); var classDeclaration = new ClassDeclaration(_class); var syntaxNodeAnalysis = syntaxNodeAnalysisFactory.Create(methodSyntax, classDeclaration); mutantOrchestrator.Mutate(syntaxNodeAnalysis); return(mutantOrchestrator.GetLatestMutantBatch().ToList()); } return(new List <Mutant>()); }