Search in sources :

Example 1 with TestEnterpriseGraphDatabaseFactory

use of org.neo4j.test.TestEnterpriseGraphDatabaseFactory in project neo4j by neo4j.

the class QueryLoggerIT method setUp.

@Before
public void setUp() {
    logsDirectory = new File(testDirectory.graphDbDir(), "logs");
    logFilename = new File(logsDirectory, "query.log");
    AssertableLogProvider inMemoryLog = new AssertableLogProvider();
    databaseBuilder = new TestEnterpriseGraphDatabaseFactory().setFileSystem(new UncloseableDelegatingFileSystemAbstraction(fileSystem.get())).setInternalLogProvider(inMemoryLog).newImpermanentDatabaseBuilder(testDirectory.graphDbDir());
}
Also used : TestEnterpriseGraphDatabaseFactory(org.neo4j.test.TestEnterpriseGraphDatabaseFactory) UncloseableDelegatingFileSystemAbstraction(org.neo4j.graphdb.mockfs.UncloseableDelegatingFileSystemAbstraction) File(java.io.File) AssertableLogProvider(org.neo4j.logging.AssertableLogProvider) Before(org.junit.Before)

Example 2 with TestEnterpriseGraphDatabaseFactory

use of org.neo4j.test.TestEnterpriseGraphDatabaseFactory in project neo4j by neo4j.

the class UdcExtensionImplTest method createDatabase.

private GraphDatabaseService createDatabase(Map<String, String> config) throws IOException {
    GraphDatabaseBuilder graphDatabaseBuilder = new TestEnterpriseGraphDatabaseFactory().newImpermanentDatabaseBuilder();
    graphDatabaseBuilder.loadPropertiesFromURL(getClass().getResource("/org/neo4j/ext/udc/udc.properties"));
    if (config != null) {
        graphDatabaseBuilder.setConfig(config);
    }
    return graphDatabaseBuilder.newGraphDatabase();
}
Also used : TestEnterpriseGraphDatabaseFactory(org.neo4j.test.TestEnterpriseGraphDatabaseFactory) GraphDatabaseBuilder(org.neo4j.graphdb.factory.GraphDatabaseBuilder)

Aggregations

TestEnterpriseGraphDatabaseFactory (org.neo4j.test.TestEnterpriseGraphDatabaseFactory)2 File (java.io.File)1 Before (org.junit.Before)1 GraphDatabaseBuilder (org.neo4j.graphdb.factory.GraphDatabaseBuilder)1 UncloseableDelegatingFileSystemAbstraction (org.neo4j.graphdb.mockfs.UncloseableDelegatingFileSystemAbstraction)1 AssertableLogProvider (org.neo4j.logging.AssertableLogProvider)1