コード例 #1
0
ファイル: PropertyKeyTest.cs プロジェクト: Neo4Net/Neo4Net
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void lazyLoadWithinWriteTransaction() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void LazyLoadWithinWriteTransaction()
        {
            // Given
            FileSystemAbstraction fileSystem = Fs.get();
            BatchInserter         inserter   = BatchInserters.inserter(TestDirectory.databaseDir(), fileSystem);
            int  count  = 3000;
            long nodeId = inserter.CreateNode(MapWithManyProperties(count));

            inserter.Shutdown();

            GraphDatabaseService db = (new TestGraphDatabaseFactory()).setFileSystem(fileSystem).newImpermanentDatabase(TestDirectory.databaseDir());

            // When
            try
            {
                using (Transaction tx = Db.beginTx())
                {
                    Db.createNode();
                    Node node = Db.getNodeById(nodeId);

                    // Then
                    assertEquals(count, Iterables.count(node.PropertyKeys));
                    tx.Success();
                }
            }
            finally
            {
                Db.shutdown();
            }
        }
コード例 #2
0
 public override long CreateNode(IDictionary <string, object> properties, params Label[] labels)
 {
     return(@delegate.CreateNode(properties, labels));
 }