// default package

import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;

import java.nio.file.Path;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;

class DocTests {

  private final Log log = new Log();
  private final Bach bach = new Bach(log, log, true);

  @Test
  void buildProjectJigsawQuickStart(@TempDir Path temp) {
    var name = "jigsaw.quick.start";
    var base = Path.of("doc/project", name);
    var summary = build(base, temp);
    var project = summary.project();
    assertEquals(name, project.descriptor().name());
    var units = project.units();
    assertEquals(1, units.size());
  }

  @Test
  void buildProjectJigsawQuickStartWithTests(@TempDir Path temp) {
    var name = "jigsaw.quick.start.with.tests";
    var base = Path.of("doc/project", name);
    var summary = build(base, temp);
    var project = summary.project();
    assertEquals(name, project.descriptor().name());
    var units = project.units();
    assertEquals(3, units.size());
  }

  private Bach.Build.Summary build(Path base, Path temp) {
    var paths = new Bach.Project.Paths(base, temp.resolve("out"), temp.resolve("lib"));
    var summary = bach.build(paths, project -> project.version("0-ea"));
    assertDoesNotThrow(summary::assertSuccessful);
    // log.lines().forEach(System.out::println);
    // summary.toMarkdown().forEach(System.out::println);
    return summary;
  }
}

@@ -140,16 +140,76 @@
 tEquals;
+%0Aimport static org.junit.jupiter.api.Assertions.assertFalse;
 %0A%0Aimport
@@ -755,24 +755,448 @@
 ts.size());%0A
+    var greetings = units.get(0);%0A    assertEquals(%22com.greetings%22, greetings.name());%0A    assertEquals(base.resolve(%22com.greetings/module-info.java%22), greetings.path());%0A    assertEquals(1, greetings.sources().size());%0A    assertEquals(0, greetings.resources().size());%0A    assertFalse(greetings.isMainClassPresent()); // TODO should be true!%0A    assertFalse(greetings.isMultiRelease());%0A    System.out.println(greetings);%0A
   %7D%0A%0A  @Test

Add more assertions