All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.pitest.maven.NonEmptyProjectCheck Maven / Gradle / Ivy

There is a newer version: 1.17.1
Show newest version
package org.pitest.maven;

import java.io.File;

import org.apache.maven.project.MavenProject;
import org.pitest.functional.FCollection;
import java.util.function.Predicate;

public class NonEmptyProjectCheck implements Predicate {

  @SuppressWarnings("unchecked")
  @Override
  public boolean test(MavenProject project) {
    return FCollection.contains(project.getTestCompileSourceRoots(), exists()) 
        && FCollection.contains(project.getCompileSourceRoots(), exists());
  }
  
  private Predicate exists() {
    return root -> new File(root).exists();
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy