private PathFilter createPathFilter() { return new PathFilter(createCodePathFilter(), not(new DefaultDependencyPathPredicate())); }
public Collection<ClassName> code() { return FCollection.filter( this.classPath.getComponent(this.pathFilter.getCodeFilter()) .findClasses(this.classFilter.getCode()), this.classFilter.getCode()).stream() .map(ClassName.stringToClassName()) .collect(Collectors.toList()); }
public Collection<ClassName> test() { return FCollection.filter( this.classPath.getComponent(this.pathFilter.getTestFilter()) .findClasses(this.classFilter.getTest()), this.classFilter.getTest()).stream() .map(ClassName.stringToClassName()) .collect(Collectors.toList()); }
private ProjectClassPaths createProjectClassPaths() { final ClassPath classPath = new ClassPath(this.compiledCodeDirectories); final Predicate<String> classPredicate = createClassPredicate(); final Predicate<ClassPathRoot> pathPredicate = new DefaultCodePathPredicate(); return new ProjectClassPaths(classPath, new ClassFilter(classPredicate, classPredicate), new PathFilter(pathPredicate, Prelude.not(new DefaultDependencyPathPredicate()))); }
public Collection<ClassName> code() { return FCollection.filter( this.classPath.getComponent(this.pathFilter.getCodeFilter()) .findClasses(this.classFilter.getCode()), this.classFilter.getCode()).stream() .map(ClassName.stringToClassName()) .collect(Collectors.toList()); }
public Collection<ClassName> test() { return FCollection.filter( this.classPath.getComponent(this.pathFilter.getTestFilter()) .findClasses(this.classFilter.getTest()), this.classFilter.getTest()).stream() .map(ClassName.stringToClassName()) .collect(Collectors.toList()); }
protected void createAndRun(SettingsFactory settings) { final JavaAgent agent = new JarCreatingJarFinder(); try { final CoverageOptions coverageOptions = createCoverageOptions(settings.createCoverageOptions().getPitConfig()); final LaunchOptions launchOptions = new LaunchOptions(agent, new DefaultJavaExecutableLocator(), this.data.getJvmArgs(), new HashMap<String, String>()); final PathFilter pf = new PathFilter(p -> true, p -> true); final ProjectClassPaths cps = new ProjectClassPaths( this.data.getClassPath(), this.data.createClassesFilter(), pf); final Timings timings = new Timings(); final CodeSource code = new CodeSource(cps); final CoverageGenerator coverageDatabase = new DefaultCoverageGenerator( null, coverageOptions, launchOptions, code, new NullCoverageExporter(), timings, false); final HistoryStore history = new NullHistoryStore(); final MutationStrategies strategies = new MutationStrategies( new GregorEngineFactory(), history, coverageDatabase, listenerFactory(), null); final MutationCoverage testee = new MutationCoverage(strategies, null, code, this.data, new SettingsFactory(this.data, this.plugins), timings); testee.runReport(); } catch (final IOException e) { throw Unchecked.translateCheckedException(e); } finally { agent.close(); } }
new HashMap<String, String>()); final PathFilter pf = new PathFilter( Prelude.not(new DefaultDependencyPathPredicate()), Prelude.not(new DefaultDependencyPathPredicate()));