Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void after()
        public virtual void After()
        {
            try
            {
                _db.shutdown();
            }
            finally
            {
                _db = null;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Reading a node command might leave a node record which referred to
        /// labels in one or more dynamic records as marked as heavy even if that
        /// node already had references to dynamic records, changed in a transaction,
        /// but had no labels on that node changed within that same transaction.
        /// Now defensively only marks as heavy if there were one or more dynamic
        /// records provided when providing the record object with the label field
        /// value. This would give the opportunity to load the dynamic records the
        /// next time that record would be ensured heavy.
        /// </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldRecoverNodeWithDynamicLabelRecords()
        public virtual void ShouldRecoverNodeWithDynamicLabelRecords()
        {
            // GIVEN
            _database = (new TestGraphDatabaseFactory()).setFileSystem(Fs).newImpermanentDatabase();
            Node node;

            Label[] labels = new Label[] { label("a"), label("b"), label("c"), label("d"), label("e"), label("f"), label("g"), label("h"), label("i"), label("j"), label("k") };
            using (Transaction tx = _database.beginTx())
            {
                node = _database.createNode(labels);
                tx.Success();
            }

            // WHEN
            using (Transaction tx = _database.beginTx())
            {
                node.SetProperty("prop", "value");
                tx.Success();
            }
            EphemeralFileSystemAbstraction snapshot = Fs.snapshot();

            _database.shutdown();
            _database = (new TestGraphDatabaseFactory()).setFileSystem(snapshot).newImpermanentDatabase();

            // THEN
            using (Transaction ignored = _database.beginTx())
            {
                node = _database.getNodeById(node.Id);
                foreach (Label label in labels)
                {
                    assertTrue(node.HasLabel(label));
                }
            }
        }
Ejemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @AfterClass public static void stopDb()
        public static void StopDb()
        {
            if (_graphdb != null)
            {
                _graphdb.shutdown();
            }
            _graphdb = null;
        }
Ejemplo n.º 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void tearDown() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void TearDown()
        {
            if (_database != null)
            {
                _database.shutdown();
            }
            Fs.Dispose();
        }
Ejemplo n.º 5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @AfterEach void tearDown()
        internal virtual void TearDown()
        {
            _database.shutdown();
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void tearDown()
        public virtual void TearDown()
        {
            _db.shutdown();
        }
Ejemplo n.º 7
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void tearDown()
        public virtual void TearDown()
        {
            _database.shutdown();
        }
Ejemplo n.º 8
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void cleanUp()
        public virtual void CleanUp()
        {
            Rollback();
            _graph.shutdown();
        }
Ejemplo n.º 9
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void shutDown()
        public virtual void ShutDown()
        {
            _db.shutdown();
        }
Ejemplo n.º 10
0
 public override void TearDown()
 {
     _db.shutdown();
     _db = null;
 }
Ejemplo n.º 11
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void after()
        public virtual void After()
        {
            _db.shutdown();
        }
Ejemplo n.º 12
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @AfterClass public static void tearDownStuff()
        public static void TearDownStuff()
        {
            _graphDb.shutdown();
        }
Ejemplo n.º 13
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void canInvokeShutdownMultipleTimes()
        public virtual void CanInvokeShutdownMultipleTimes()
        {
            _graphDb.shutdown();
            _graphDb.shutdown();
        }
Ejemplo n.º 14
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void cleanup()
        public virtual void Cleanup()
        {
            _db.shutdown();
        }
Ejemplo n.º 15
0
 public override void Shutdown()
 {
     _db.shutdown();
 }