//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldVisitEachLofFile() throws Throwable //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldVisitEachLofFile() { // given LogFiles files = CreateLogFiles(); DatabaseLayout databaseLayout = TestDirectory.databaseLayout(); FileSystemRule.create(databaseLayout.File(GetVersionedLogFileName("1"))).close(); FileSystemRule.create(databaseLayout.File(GetVersionedLogFileName("some", "2"))).close(); FileSystemRule.create(databaseLayout.File(GetVersionedLogFileName("3"))).close(); FileSystemRule.create(databaseLayout.File(_filename)).close(); // when //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final java.util.List<java.io.File> seenFiles = new java.util.ArrayList<>(); IList <File> seenFiles = new List <File>(); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final java.util.List<long> seenVersions = new java.util.ArrayList<>(); IList <long> seenVersions = new List <long>(); Files.accept((file, logVersion) => { seenFiles.Add(file); seenVersions.Add(logVersion); }); // then assertThat(seenFiles, containsInAnyOrder(databaseLayout.File(GetVersionedLogFileName(_filename, "1")), databaseLayout.File(GetVersionedLogFileName(_filename, "3")))); assertThat(seenVersions, containsInAnyOrder(1L, 3L)); Files.shutdown(); }
//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 shouldRestartPopulationIfIndexFileWasNeverFullyInitialized() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldRestartPopulationIfIndexFileWasNeverFullyInitialized() { // given File labelScanStoreFile = NativeLabelScanStore.GetLabelScanStoreFile(TestDirectory.databaseLayout()); FileSystemRule.create(labelScanStoreFile).close(); TrackingMonitor monitor = new TrackingMonitor(); LifeSupport life = new LifeSupport(); // when life.Add(CreateLabelScanStore(FileSystemRule.get(), TestDirectory.databaseLayout(), EMPTY, true, false, monitor)); life.Start(); // then assertTrue(monitor.CorruptedIndex); assertTrue(monitor.RebuildingCalled); life.Shutdown(); }