//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: java.io.File prepareDirectory(java.io.File databaseDirectory) throws java.io.IOException internal virtual File PrepareDirectory(File databaseDirectory) { if (!databaseDirectory.exists() && !databaseDirectory.mkdirs()) { throw new IOException("Could not create directory " + databaseDirectory); } Unzip.unzip(this.GetType(), ResourceName, databaseDirectory); (new File(databaseDirectory, "debug.log")).delete(); // clear the log return(databaseDirectory); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void migrationShouldFail() throws Throwable //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void MigrationShouldFail() { // migrate the store using a single instance File databaseDirectory = Unzip.unzip(this.GetType(), DbFileName, TestDir.databaseDir()); (new File(databaseDirectory, "debug.log")).delete(); // clear the log GraphDatabaseFactory factory = new TestGraphDatabaseFactory(); GraphDatabaseBuilder builder = factory.NewEmbeddedDatabaseBuilder(TestDir.databaseDir()); builder.SetConfig(GraphDatabaseSettings.allow_upgrade, "true"); builder.SetConfig(GraphDatabaseSettings.pagecache_memory, "8m"); try { builder.NewGraphDatabase(); fail("It should have failed."); } catch (Exception ex) { assertTrue(ex.InnerException is LifecycleException); Exception realException = ex.InnerException.InnerException; assertTrue("Unexpected exception", Exceptions.contains(realException, typeof(StoreUpgrader.UnexpectedUpgradingStoreVersionException))); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void prepareStore(String store) throws java.io.IOException private void PrepareStore(string store) { Unzip.unzip(this.GetType(), store, TestDir.databaseDir()); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private static java.io.File highLimit3_0Store(java.io.File databaseDirectory) throws java.io.IOException private static File HighLimit3_0Store(File databaseDirectory) { return(Unzip.unzip(typeof(EnterpriseStoreUpgraderTest), "upgradeTest30HighLimitDb.zip", databaseDirectory)); }