//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: KeyValueStoreFile create(java.util.Map<String,String> config, java.util.Map<String,byte[]> headers, DataProvider data) throws java.io.IOException internal virtual KeyValueStoreFile Create(IDictionary <string, string> config, IDictionary <string, sbyte[]> headers, DataProvider data) { PageCacheRule.PageCacheConfig pageCacheConfig = PageCacheRule.config(); PageCache pageCache = outerInstance.Pages.getPageCache(outerInstance.Fs.get(), pageCacheConfig, Config.defaults(config)); return(CreateStore(outerInstance.Fs.get(), pageCache, outerInstance.StoreFile, 16, 16, headers(headers), data)); }
protected internal virtual void CreateRules() { TestDirectory = TestDirectory.testDirectory(); EphemeralFileSystemRule ephemeralFileSystemRule = new EphemeralFileSystemRule(); FileSystemRule = ephemeralFileSystemRule; PageCacheRule = new PageCacheRule(); Rules = RuleChain.outerRule(ephemeralFileSystemRule).around(TestDirectory).around(PageCacheRule); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void writingOfHeaderRecordDuringInitialiseNewStoreFileMustThrowOnPageOverflow() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void WritingOfHeaderRecordDuringInitialiseNewStoreFileMustThrowOnPageOverflow() { // 16-byte header will overflow an 8-byte page size PageCacheRule.PageCacheConfig pageCacheConfig = PageCacheRule.config(); PageCache pageCache = _pageCacheRule.getPageCache(_fs.get(), pageCacheConfig, _config); MyStore store = new MyStore(this, _config, pageCache, PAGE_SIZE + 1); AssertThrowsUnderlyingStorageException(() => store.initialise(true)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Before public void setUp() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void SetUp() { _life = new LifeSupport(); _scheduler = _life.add(createScheduler()); _life.start(); _cacheTracer = new DefaultPageCacheTracer(); _cursorTracer = DefaultPageCursorTracerSupplier.INSTANCE; ClearTracerCounts(); _cfg = PageCacheRule.config().withTracer(_cacheTracer).withCursorTracerSupplier(_cursorTracer); _file = new File(_testDirectory.databaseDir(), "a"); _fs.create(_file); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void extractHeaderRecordDuringLoadStorageMustThrowOnPageOverflow() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ExtractHeaderRecordDuringLoadStorageMustThrowOnPageOverflow() { MyStore first = new MyStore(this, _config, _pageCacheRule.getPageCache(_fs.get(), _config), 8); first.Initialise(true); first.Close(); PageCacheRule.PageCacheConfig pageCacheConfig = PageCacheRule.config(); PageCache pageCache = _pageCacheRule.getPageCache(_fs.get(), pageCacheConfig, _config); MyStore second = new MyStore(this, _config, pageCache, PAGE_SIZE + 1); AssertThrowsUnderlyingStorageException(() => second.initialise(false)); }