FINERACT-1608: Add introduction to Asciidoc

This commit is contained in:
Aleksandar Vidakovic
2022-05-10 12:12:57 +02:00
committed by Aleksandar Vidakovic
parent a3ab06593f
commit b0a261cbd5
43 changed files with 537 additions and 99 deletions
@@ -35,10 +35,13 @@ public class ClasspathDuplicatesStepDefinitions implements En {
private ClassGraph classGraph;
public ClasspathDuplicatesStepDefinitions() {
// tag::given[]
Given("A class graph", () -> {
this.classGraph = new ClassGraph();
});
// end::given[]
// tag::when[]
When("The user scans the class graph", () -> {
// nothing to do here
try (ScanResult scanResult = this.classGraph.scan()) {
@@ -61,12 +64,15 @@ public class ClasspathDuplicatesStepDefinitions implements En {
}
}
});
// end::when[]
// tag::then[]
Then("There should be no duplicates", () -> {
if (!duplicates.isEmpty()) {
throw new AssertionFailedError(duplicates.size() + " Classpath duplicates detected:\n" + duplicates);
}
});
// end::then[]
}
private boolean skipJAR(String jarPath) {