package com.github.ferstl.depgraph;

import java.io.File;
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.MavenRuntime.MavenRuntimeBuilder;
import io.takari.maven.testing.executor.MavenVersions;
import io.takari.maven.testing.executor.junit.MavenJUnitTestRunner;

@RunWith(MavenJUnitTestRunner.class)
@MavenVersions("3.3.9")
public class IntegrationTest {

  @Rule
  public final TestResources resources = new TestResources();

  private final MavenRuntime mavenRuntime;

  public IntegrationTest(MavenRuntimeBuilder builder) throws Exception {
    this.mavenRuntime = builder.build();
  }

  @Test
  public void graph() throws Exception {
    File basedir = this.resources.getBasedir("depgraph-maven-plugin-test");
    MavenExecutionResult result = this.mavenRuntime
        .forProject(basedir)
        .execute("clean", "depgraph:graph");

    result.assertErrorFreeLog();
  }
}

@@ -488,16 +488,88 @@
 tRunner;
+%0Aimport static io.takari.maven.testing.TestResources.assertFilesPresent;
 %0A%0A@RunWi
@@ -1170,18 +1170,215 @@
 rFreeLog();%0A
+    assertFilesPresent(%0A        basedir,%0A        %22module-1/target/dependency-graph.dot%22,%0A        %22module-2/target/dependency-graph.dot%22,%0A        %22sub-parent/module-3/target/dependency-graph.dot%22);%0A
   %7D%0A%7D%0A

Add assertion for dot files