//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldCloseUnderlyingClient() public virtual void ShouldCloseUnderlyingClient() { // GIVEN Locks_Client actualClient = mock(typeof(Locks_Client)); DeferringLockClient client = new DeferringLockClient(actualClient); // WHEN client.Close(); // THEN verify(actualClient).close(); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldThrowOnAcquireWhenClosed() public virtual void ShouldThrowOnAcquireWhenClosed() { // GIVEN Locks_Client actualClient = mock(typeof(Locks_Client)); DeferringLockClient client = new DeferringLockClient(actualClient); client.Close(); try { // WHEN client.AcquireExclusive(LockTracer.NONE, ResourceTypes.Node, 1); fail("Expected exception"); } catch (LockClientStoppedException) { // THEN } }
public override void Close() { @implicit.Close(); }