//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void databaseHealthShouldBeHealedOnStart() throws Throwable //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void DatabaseHealthShouldBeHealedOnStart() { NeoStoreDataSource theDataSource = null; try { DatabaseHealth databaseHealth = new DatabaseHealth(mock(typeof(DatabasePanicEventGenerator)), NullLogProvider.Instance.getLog(typeof(DatabaseHealth))); Dependencies dependencies = new Dependencies(); dependencies.SatisfyDependency(databaseHealth); theDataSource = DsRule.getDataSource(Dir.databaseLayout(), Fs.get(), PageCacheRule.getPageCache(Fs.get()), dependencies); databaseHealth.Panic(new Exception()); theDataSource.Start(); databaseHealth.AssertHealthy(typeof(Exception)); } finally { if (theDataSource != null) { theDataSource.Stop(); theDataSource.Shutdown(); } } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void dirtyDatabase() throws java.io.IOException private void DirtyDatabase() { _db = StartDatabase(); DatabaseHealth databaseHealth = databaseHealth(_db); Index(_db); SomeData(_db); Checkpoint(_db); SomeData(_db); databaseHealth.Panic(new Exception("Trigger recovery on next startup")); _db.shutdown(); _db = null; }