//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldReleaseStorageReaderWhenForceClosed() public virtual void ShouldReleaseStorageReaderWhenForceClosed() { // given StorageReader storeStatement = mock(typeof(StorageReader)); KernelStatement statement = new KernelStatement(mock(typeof(KernelTransactionImplementation)), null, storeStatement, LockTracer.NONE, mock(typeof(StatementOperationParts)), new ClockContext(), EmptyVersionContextSupplier.EMPTY); statement.Acquire(); // when try { statement.ForceClose(); } catch (KernelStatement.StatementNotClosedException) { // ignore } // then verify(storeStatement).release(); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldReleaseStoreStatementWhenForceClosingStatements() public virtual void ShouldReleaseStoreStatementWhenForceClosingStatements() { // given KernelTransactionImplementation transaction = mock(typeof(KernelTransactionImplementation)); StorageReader storageReader = mock(typeof(StorageReader)); KernelStatement statement = GetKernelStatement(transaction, storageReader); statement.Acquire(); // when try { statement.ForceClose(); } catch (KernelStatement.StatementNotClosedException) { //ignored } // then verify(storageReader).release(); }