Exemplo n.º 1
0
        private void SetupDb(GraphDatabaseSettings.SchemaIndex schemaIndex)
        {
            TestGraphDatabaseFactory dbFactory = new TestGraphDatabaseFactory();
            GraphDatabaseBuilder     builder   = dbFactory.NewEmbeddedDatabaseBuilder(_directory.storeDir()).setConfig(GraphDatabaseSettings.default_schema_provider, schemaIndex.providerName());

            _db = builder.NewGraphDatabase();
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @ParameterizedTest @MethodSource("providerSettings") void shouldThrowWhenAddingNonUniquePoints(org.neo4j.graphdb.factory.GraphDatabaseSettings.SchemaIndex schemaIndex)
        internal virtual void ShouldThrowWhenAddingNonUniquePoints(GraphDatabaseSettings.SchemaIndex schemaIndex)
        {
            // given
            SetupDb(schemaIndex);
            CreateUniquenessConstraint();

            // when
            assertThrows(typeof(ConstraintViolationException), this.createNonUniqueNodes);
        }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @ParameterizedTest @MethodSource("providerSettings") void shouldPopulateIndexWithUniquePointsThatCollideOnSpaceFillingCurve(org.neo4j.graphdb.factory.GraphDatabaseSettings.SchemaIndex schemaIndex)
        internal virtual void ShouldPopulateIndexWithUniquePointsThatCollideOnSpaceFillingCurve(GraphDatabaseSettings.SchemaIndex schemaIndex)
        {
            // given
            SetupDb(schemaIndex);
            Pair <long, long> nodeIds = CreateUniqueNodes();

            // when
            CreateUniquenessConstraint();

            // then
            AssertBothNodesArePresent(nodeIds);
        }