//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldPrepareExplicitForCommitWhenLocksAcquire() public virtual void ShouldPrepareExplicitForCommitWhenLocksAcquire() { // GIVEN //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final Locks_Client client = mock(Locks_Client.class); Locks_Client client = mock(typeof(Locks_Client)); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final DeferringStatementLocks statementLocks = new DeferringStatementLocks(client); DeferringStatementLocks statementLocks = new DeferringStatementLocks(client); // WHEN statementLocks.Optimistic().acquireExclusive(LockTracer.NONE, ResourceTypes.Node, 1); statementLocks.Optimistic().acquireExclusive(LockTracer.NONE, ResourceTypes.Relationship, 42); verify(client, never()).acquireExclusive(eq(LockTracer.NONE), any(typeof(ResourceType)), anyLong()); statementLocks.PrepareForCommit(LockTracer.NONE); // THEN verify(client).prepare(); verify(client).acquireExclusive(LockTracer.NONE, ResourceTypes.Node, 1); verify(client).acquireExclusive(LockTracer.NONE, ResourceTypes.Relationship, 42); verifyNoMoreInteractions(client); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldUseCorrectClientForImplicitAndExplicit() public virtual void ShouldUseCorrectClientForImplicitAndExplicit() { // GIVEN //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final Locks_Client client = mock(Locks_Client.class); Locks_Client client = mock(typeof(Locks_Client)); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final DeferringStatementLocks statementLocks = new DeferringStatementLocks(client); DeferringStatementLocks statementLocks = new DeferringStatementLocks(client); // THEN assertSame(client, statementLocks.Pessimistic()); assertThat(statementLocks.Optimistic(), instanceOf(typeof(DeferringLockClient))); }