- All Implemented Interfaces:
- org.asciidoctor.extension.Processor
public class QueryConsumingTreeProcessor
extends org.asciidoctor.extension.Treeprocessor
Extension for Asciidoctor.
It looks for two kinds of blocks in the AsciiDoc source:
1) Blocks with the role `setup-query`. The content is passed to a SetupQueryConsumer.
A doc test can use this by making the SetupQueryConsumer run the content as a setup query before running tests.
2) Blocks with the role `query-example`. The content is expected to contain exactly two blocks:
2.1) First, a block containing a Cypher query example.
2.2) Second, a table containing a Cypher query result.
The query, the table header, and all the rows, are passed to the QueryExampleConsumer.
A doc test can use this by making the QueryExampleConsumer run the queries and assert that the result on each row matches the result