示例#1
0
//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();
        }
示例#2
0
//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
            }
        }
示例#3
0
 public override void Close()
 {
     @implicit.Close();
 }