//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldNotFindLogPosition() public virtual void ShouldNotFindLogPosition() { // given const long txId = 1L; //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.neo4j.kernel.impl.transaction.log.PhysicalLogicalTransactionStore.LogVersionLocator locator = new org.neo4j.kernel.impl.transaction.log.PhysicalLogicalTransactionStore.LogVersionLocator(txId); PhysicalLogicalTransactionStore.LogVersionLocator locator = new PhysicalLogicalTransactionStore.LogVersionLocator(txId); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.neo4j.kernel.impl.transaction.log.LogPosition position = new org.neo4j.kernel.impl.transaction.log.LogPosition(1, 128); LogPosition position = new LogPosition(1, 128); // when //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final boolean result = locator.visit(position, firstTxIdInLog, lastTxIdInLog); bool result = locator.Visit(position, _firstTxIdInLog, _lastTxIdInLog); // then assertTrue(result); try { locator.LogPosition; fail("should have thrown"); } catch (NoSuchTransactionException e) { assertEquals("Unable to find transaction " + txId + " in any of my logical logs: " + "Couldn't find any log containing " + txId, e.Message); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldAlwaysThrowIfVisitIsNotCalled() public virtual void ShouldAlwaysThrowIfVisitIsNotCalled() { // given const long txId = 1L; //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.neo4j.kernel.impl.transaction.log.PhysicalLogicalTransactionStore.LogVersionLocator locator = new org.neo4j.kernel.impl.transaction.log.PhysicalLogicalTransactionStore.LogVersionLocator(txId); PhysicalLogicalTransactionStore.LogVersionLocator locator = new PhysicalLogicalTransactionStore.LogVersionLocator(txId); // then try { locator.LogPosition; fail("should have thrown"); } catch (NoSuchTransactionException e) { assertEquals("Unable to find transaction " + txId + " in any of my logical logs: " + "Couldn't find any log containing " + txId, e.Message); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldFindLogPosition() throws org.neo4j.kernel.impl.transaction.log.NoSuchTransactionException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldFindLogPosition() { // given const long txId = 42L; //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.neo4j.kernel.impl.transaction.log.PhysicalLogicalTransactionStore.LogVersionLocator locator = new org.neo4j.kernel.impl.transaction.log.PhysicalLogicalTransactionStore.LogVersionLocator(txId); PhysicalLogicalTransactionStore.LogVersionLocator locator = new PhysicalLogicalTransactionStore.LogVersionLocator(txId); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.neo4j.kernel.impl.transaction.log.LogPosition position = new org.neo4j.kernel.impl.transaction.log.LogPosition(1, 128); LogPosition position = new LogPosition(1, 128); // when //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final boolean result = locator.visit(position, firstTxIdInLog, lastTxIdInLog); bool result = locator.Visit(position, _firstTxIdInLog, _lastTxIdInLog); // then assertFalse(result); assertEquals(position, locator.LogPosition); }