//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @ParameterizedTest @ValueSource(ints = {0, 1}) @DisabledOnOs(org.junit.jupiter.api.condition.OS.WINDOWS) void fileMustRemainLockedEvenIfChannelIsClosedByStrayInterrupt(int noChannelStriping) throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void FileMustRemainLockedEvenIfChannelIsClosedByStrayInterrupt(int noChannelStriping) { PageSwapperFactory factory = CreateSwapperFactory(); factory.Open(_fileSystem, Configuration.EMPTY); File file = TestDir.file("file"); _fileSystem.create(file).close(); PageSwapper pageSwapper = CreateSwapper(factory, file, 4, NoCallback, false, Bool(noChannelStriping)); try { StoreChannel channel = _fileSystem.open(file, OpenMode.READ_WRITE); Thread.CurrentThread.Interrupt(); pageSwapper.Force(); assertThrows(typeof(OverlappingFileLockException), channel.tryLock); } finally { pageSwapper.Close(); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void force() throws java.io.IOException public override void Force() { @delegate.Force(); }