Search in sources :

Example 1 with JavaDocsGenerator

use of org.neo4j.doc.tools.JavaDocsGenerator in project neo4j-documentation by neo4j.

the class OrderedPathDocTest method setUp.

@BeforeClass
public static void setUp() throws IOException {
    if (Files.exists(OrderedPath.databaseDirectory)) {
        FileUtils.deleteDirectory(OrderedPath.databaseDirectory);
    }
    DatabaseManagementService managementService = new DatabaseManagementServiceBuilder(OrderedPath.databaseDirectory).build();
    db = managementService.database(DEFAULT_DATABASE_NAME);
    orderedPath = new OrderedPath(managementService, OrderedPathDocTest.db);
    gen = new JavaDocsGenerator("ordered-path-java", "dev");
}
Also used : DatabaseManagementServiceBuilder(org.neo4j.dbms.api.DatabaseManagementServiceBuilder) DatabaseManagementService(org.neo4j.dbms.api.DatabaseManagementService) JavaDocsGenerator(org.neo4j.doc.tools.JavaDocsGenerator) BeforeClass(org.junit.BeforeClass)

Example 2 with JavaDocsGenerator

use of org.neo4j.doc.tools.JavaDocsGenerator in project neo4j-documentation by neo4j.

the class JavaQueryDocTest method test.

@Test
public void test() {
    JavaDocsGenerator gen = new JavaDocsGenerator("java-cypher-queries", "dev/java");
    JavaQuery jq = new JavaQuery();
    jq.run();
    assertTrue(jq.columnsString.contains("n,"));
    assertTrue(jq.columnsString.contains("n.name"));
    assertTrue(jq.resultString.contains("Node["));
    assertTrue(jq.resultString.contains("name"));
    assertTrue(jq.resultString.contains("my"));
    assertTrue(jq.resultString.contains("1 row"));
    assertTrue(jq.nodeResult.contains("Node["));
    assertTrue(jq.nodeResult.contains("my"));
    assertTrue(jq.rows.contains("n.name: my node; "));
    assertTrue(jq.rows.contains("Node["));
    assertTrue(jq.rows.contains("];"));
    gen.saveToFile("result", AsciidocHelper.createOutputSnippet(jq.resultString));
    gen.saveToFile("columns", AsciidocHelper.createOutputSnippet(jq.columnsString));
    gen.saveToFile("node", AsciidocHelper.createOutputSnippet(jq.nodeResult));
    gen.saveToFile("rows", AsciidocHelper.createOutputSnippet(jq.rows));
}
Also used : JavaDocsGenerator(org.neo4j.doc.tools.JavaDocsGenerator) Test(org.junit.Test)

Example 3 with JavaDocsGenerator

use of org.neo4j.doc.tools.JavaDocsGenerator in project neo4j-documentation by neo4j.

the class EmbeddedNeo4jDocTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws Exception {
    hello = new EmbeddedNeo4j();
    gen = new JavaDocsGenerator("hello-world-java", "dev");
}
Also used : JavaDocsGenerator(org.neo4j.doc.tools.JavaDocsGenerator) BeforeClass(org.junit.BeforeClass)

Aggregations

JavaDocsGenerator (org.neo4j.doc.tools.JavaDocsGenerator)3 BeforeClass (org.junit.BeforeClass)2 Test (org.junit.Test)1 DatabaseManagementService (org.neo4j.dbms.api.DatabaseManagementService)1 DatabaseManagementServiceBuilder (org.neo4j.dbms.api.DatabaseManagementServiceBuilder)1