//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldNotOpenStoreWithNodesOrRelationshipsInIt() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldNotOpenStoreWithNodesOrRelationshipsInIt() { // GIVEN SomeDataInTheDatabase(); // WHEN try { using (JobScheduler jobScheduler = new ThreadPoolJobScheduler()) { RecordFormats recordFormats = RecordFormatSelector.selectForConfig(Config.defaults(), NullLogProvider.Instance); using (BatchingNeoStores store = BatchingNeoStores.BatchingNeoStoresConflict(Storage.fileSystem(), Storage.directory().databaseDir(), recordFormats, DEFAULT, NullLogService.Instance, EMPTY, Config.defaults(), jobScheduler)) { store.CreateNew(); fail("Should fail on existing data"); } } } catch (System.InvalidOperationException e) { // THEN assertThat(e.Message, containsString("already contains")); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldRespectDbConfig() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldRespectDbConfig() { // GIVEN int size = 10; Config config = Config.defaults(stringMap(GraphDatabaseSettings.array_block_size.name(), size.ToString(), GraphDatabaseSettings.string_block_size.name(), size.ToString())); // WHEN RecordFormats recordFormats = LATEST_RECORD_FORMATS; int headerSize = recordFormats.Dynamic().RecordHeaderSize; using (JobScheduler jobScheduler = new ThreadPoolJobScheduler(), BatchingNeoStores store = BatchingNeoStores.BatchingNeoStoresConflict(Storage.fileSystem(), Storage.directory().absolutePath(), recordFormats, DEFAULT, NullLogService.Instance, EMPTY, config, jobScheduler)) { store.CreateNew(); // THEN assertEquals(size + headerSize, store.PropertyStore.ArrayStore.RecordSize); assertEquals(size + headerSize, store.PropertyStore.StringStore.RecordSize); } }