// Path: src/test/java/com/github/ferstl/depgraph/MavenVersion.java
// public static final String MAX_VERSION = "3.6.3";
// 
// Path: src/test/java/com/github/ferstl/depgraph/MavenVersion.java
// public static final String MIN_VERSION = "3.2.5";


import java.io.File;
import java.nio.file.FileSystems;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import io.takari.maven.testing.TestResources;
import io.takari.maven.testing.executor.MavenExecutionResult;
import io.takari.maven.testing.executor.MavenRuntime;
import io.takari.maven.testing.executor.MavenVersions;
import io.takari.maven.testing.executor.junit.MavenJUnitTestRunner;
import static com.github.ferstl.depgraph.MavenVersion.MAX_VERSION;
import static com.github.ferstl.depgraph.MavenVersion.MIN_VERSION;
import static io.takari.maven.testing.TestResources.assertFileContents;
import static io.takari.maven.testing.TestResources.assertFilesPresent;
    assertFileContents(basedir, "expectations/module-b-compile-scope.txt", "module-b/target/dependency-graph.txt");
    assertFileContents(basedir, "expectations/module-c-compile-scope.txt", "module-c/target/dependency-graph.txt");
    assertFileContents(basedir, "expectations/module-d-compile-scope.txt", "module-d/target/dependency-graph.txt");
  }

  @Test
  public void providedOnly() throws Exception {
    File basedir = this.resources.getBasedir("scopes-test");
    MavenExecutionResult result = this.mavenRuntime
        .forProject(basedir)
        .withCliOption("-DgraphFormat=text")
        .withCliOption("-Dscopes=provided")
        .execute("clean", "depgraph:graph");

    result.assertErrorFreeLog();

    assertFilesPresent(
        basedir,
        "module-a/target/dependency-graph.txt",
        "module-b/target/dependency-graph.txt",
        "module-c/target/dependency-graph.txt",
        "module-d/target/dependency-graph.txt"
    );

    assertFileContents(basedir, "expectations/module-a-provided-scope.txt", "module-a/target/dependency-graph.txt");
    assertFileContents(basedir, "expectations/module-b-provided-scope.txt", "module-b/target/dependency-graph.txt");
    assertFileContents(basedir, "expectations/module-c-provided-scope.txt", "module-c/target/dependency-graph.txt");
    assertFileContents(basedir, "expectations/module-d-provided-scope.txt", "module-d/target/dependency-graph.txt");
  }

// Path: src/test/java/com/github/ferstl/depgraph/MavenVersion.java
// public static final String MAX_VERSION = "3.6.3";
// 
// Path: src/test/java/com/github/ferstl/depgraph/MavenVersion.java
// public static final String MIN_VERSION = "3.2.5";


// Path: src/test/java/com/github/ferstl/depgraph/ScopesIntegrationTest.java
import java.io.File;
import java.nio.file.FileSystems;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import io.takari.maven.testing.TestResources;
import io.takari.maven.testing.executor.MavenExecutionResult;
import io.takari.maven.testing.executor.MavenRuntime;
import io.takari.maven.testing.executor.MavenVersions;
import io.takari.maven.testing.executor.junit.MavenJUnitTestRunner;
import static com.github.ferstl.depgraph.MavenVersion.MAX_VERSION;
import static com.github.ferstl.depgraph.MavenVersion.MIN_VERSION;
import static io.takari.maven.testing.TestResources.assertFileContents;
import static io.takari.maven.testing.TestResources.assertFilesPresent;

    assertFileContents(basedir, "expectations/module-b-compile-scope.txt", "module-b/target/dependency-graph.txt");
    assertFileContents(basedir, "expectations/module-c-compile-scope.txt", "module-c/target/dependency-graph.txt");
    assertFileContents(basedir, "expectations/module-d-compile-scope.txt", "module-d/target/dependency-graph.txt");
  }

  @Test
  public void providedOnly() throws Exception {
    File basedir = this.resources.getBasedir("scopes-test");
    MavenExecutionResult result = this.mavenRuntime
        .forProject(basedir)
        .withCliOption("-DgraphFormat=text")
        .withCliOption("-Dscopes=provided")
        .execute("clean", "depgraph:graph");

    result.assertErrorFreeLog();

    assertFilesPresent(
        basedir,
        "module-a/target/dependency-graph.txt",
        "module-b/target/dependency-graph.txt",
        "module-c/target/dependency-graph.txt",
        "module-d/target/dependency-graph.txt"
    );

    assertFileContents(basedir, "expectations/module-a-provided-scope.txt", "module-a/target/dependency-graph.txt");
    assertFileContents(basedir, "expectations/module-b-provided-scope.txt", "module-b/target/dependency-graph.txt");
    assertFileContents(basedir, "expectations/module-c-provided-scope.txt", "module-c/target/dependency-graph.txt");
    assertFileContents(basedir, "expectations/module-d-provided-scope.txt", "module-d/target/dependency-graph.txt");
  }

  @Test