Examples of TestGraphDatabaseFactory


Examples of org.neo4j.test.TestGraphDatabaseFactory

            setBasePackage(EntityWithGenericProperty.class.getPackage().getName());
        }

        @Bean
        GraphDatabaseService graphDatabaseService() {
            return new TestGraphDatabaseFactory().newImpermanentDatabase();
        }
View Full Code Here

Examples of org.neo4j.test.TestGraphDatabaseFactory

* @since 11.11.13
*/
public class EntityRemoverTest {
    @Test
    public void testRemoveNodeEntityWithAutoIndex() throws Exception {
        GraphDatabaseService db = new TestGraphDatabaseFactory().newImpermanentDatabase();
        try (Transaction tx = db.beginTx()) {
            AutoIndexer<Node> nodeAutoIndexer = db.index().getNodeAutoIndexer();
            nodeAutoIndexer.setEnabled(true);
            nodeAutoIndexer.startAutoIndexingProperty("foo");
            Infrastructure infrastructure = MappingInfrastructureFactoryBean.createDirect(db, null);
View Full Code Here

Examples of org.neo4j.test.TestGraphDatabaseFactory

            tx.success();
        }
    }
    @Test
    public void testRemoveRelationshipEntityWithAutoIndex() throws Exception {
        GraphDatabaseService db = new TestGraphDatabaseFactory().newImpermanentDatabase();
        try (Transaction tx = db.beginTx()) {
            AutoIndexer<Relationship> autoIndexer = db.index().getRelationshipAutoIndexer();
            autoIndexer.setEnabled(true);
            autoIndexer.startAutoIndexingProperty("foo");
            Infrastructure infrastructure = MappingInfrastructureFactoryBean.createDirect(db, null);
View Full Code Here

Examples of org.neo4j.test.TestGraphDatabaseFactory

            setBasePackage(EntityWithCustomTypeProperty.class.getPackage().getName());
        }

        @Bean
        GraphDatabaseService graphDatabaseService() {
            return new TestGraphDatabaseFactory().newImpermanentDatabase();
        }
View Full Code Here

Examples of org.neo4j.test.TestGraphDatabaseFactory

import java.net.URI;

public class MemoryDatastoreFactory implements DatastoreFactory<EmbeddedNeo4jDatastore> {

    @Override public EmbeddedNeo4jDatastore createGraphDatabaseService(URI uri) {
        GraphDatabaseService graphDatabaseService = new TestGraphDatabaseFactory().newImpermanentDatabase();
        return new EmbeddedNeo4jDatastore(graphDatabaseService);
    }
View Full Code Here

Examples of org.neo4j.test.TestGraphDatabaseFactory

  @Nonnull
  private final List<GraphDatabaseService> dbs = new ArrayList<>();

  @Nonnull
  public GraphDatabaseService createDb() throws IOException {
    GraphDatabaseService db = new TestGraphDatabaseFactory().newImpermanentDatabase( tmp.newFolder().getAbsolutePath() );
    dbs.add( db );
    return db;
  }
View Full Code Here

Examples of org.neo4j.test.TestGraphDatabaseFactory

public class MemoryDatastoreFactory implements DatastoreFactory<EmbeddedNeo4jDatastore> {

    @Override
    public EmbeddedNeo4jDatastore createGraphDatabaseService(URI uri, Properties properties) {
        GraphDatabaseService graphDatabaseService = new TestGraphDatabaseFactory().newImpermanentDatabase();
        return new EmbeddedNeo4jDatastore(graphDatabaseService);
    }
View Full Code Here

Examples of org.neo4j.test.TestGraphDatabaseFactory

public class MemoryDatastoreFactory implements DatastoreFactory<EmbeddedNeo4jDatastore> {

    @Override
    public EmbeddedNeo4jDatastore createGraphDatabaseService(URI uri) {
        GraphDatabaseService graphDatabaseService = new TestGraphDatabaseFactory().newImpermanentDatabase();
        return new EmbeddedNeo4jDatastore(graphDatabaseService);
    }
View Full Code Here

Examples of org.neo4j.test.TestGraphDatabaseFactory

    public static final String MESSAGE = "I want to see this";

    @Test
    public void testSuppressedException() throws Exception {
        try {
        GraphDatabaseService db = new TestGraphDatabaseFactory().newImpermanentDatabase();
        try (Transaction tx = db.beginTx()) {
            Node n = db.createNode();
            try (Transaction tx2 = db.beginTx()) {
                n.setProperty("foo","bar");
                if (true) throw new Exception(MESSAGE);
View Full Code Here

Examples of org.neo4j.test.TestGraphDatabaseFactory

    }

    @Test
    public void testSuppressedExceptionTopLevel() throws Exception {
        try {
            GraphDatabaseService db = new TestGraphDatabaseFactory().newImpermanentDatabase();
            try (Transaction tx = db.beginTx()) {
                Node n = db.createNode();
                n.setProperty("foo", "bar");
                if (true) throw new Exception(MESSAGE);
                tx.success();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.