// 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;
    result.assertErrorFreeLog();
    assertFilesPresent(
        basedir,
        "module-1/target/dependency-graph.dot",
        "module-2/target/dependency-graph.dot",
        "target/dependency-graph.dot");

    assertFileContents(basedir, "expectations/graph_module-1_mergeTypes-mergeClassifiers.dot", "module-1/target/dependency-graph.dot");
  }

  @Test
  public void aggregateMergeClassifiers() throws Exception {
    File basedir = this.resources.getBasedir("merge-test");
    MavenExecutionResult result = this.mavenRuntime
        .forProject(basedir)
        .withCliOption("-DmergeClassifiers")
        // Maven 3.1 does not resolve the module-2 ZIP dependency from the reactor. That's why we need to execute "install".
        .execute("clean", "install", "depgraph:aggregate");

    result.assertErrorFreeLog();
    assertFilesPresent(basedir, "target/dependency-graph.dot");

    assertFileContents(basedir, "expectations/aggregate_mergeClassifiers.dot", "target/dependency-graph.dot");
  }

  @Test
  public void aggregateMergeTypes() throws Exception {
    File basedir = this.resources.getBasedir("merge-test");
    MavenExecutionResult result = this.mavenRuntime
        .forProject(basedir)
// 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/MergeOptionsIntegrationTest.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;

    result.assertErrorFreeLog();
    assertFilesPresent(
        basedir,
        "module-1/target/dependency-graph.dot",
        "module-2/target/dependency-graph.dot",
        "target/dependency-graph.dot");

    assertFileContents(basedir, "expectations/graph_module-1_mergeTypes-mergeClassifiers.dot", "module-1/target/dependency-graph.dot");
  }

  @Test
  public void aggregateMergeClassifiers() throws Exception {
    File basedir = this.resources.getBasedir("merge-test");
    MavenExecutionResult result = this.mavenRuntime
        .forProject(basedir)
        .withCliOption("-DmergeClassifiers")
        // Maven 3.1 does not resolve the module-2 ZIP dependency from the reactor. That's why we need to execute "install".
        .execute("clean", "install", "depgraph:aggregate");

    result.assertErrorFreeLog();
    assertFilesPresent(basedir, "target/dependency-graph.dot");

    assertFileContents(basedir, "expectations/aggregate_mergeClassifiers.dot", "target/dependency-graph.dot");
  }

  @Test
  public void aggregateMergeTypes() throws Exception {
    File basedir = this.resources.getBasedir("merge-test");
    MavenExecutionResult result = this.mavenRuntime
        .forProject(basedir)
        .withCliOption("-DmergeTypes")