Esempio n. 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldReturnTheHeaderIfInTheCache()
		 public virtual void ShouldReturnTheHeaderIfInTheCache()
		 {
			  // given
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.kernel.impl.transaction.log.LogHeaderCache cache = new org.neo4j.kernel.impl.transaction.log.LogHeaderCache(2);
			  LogHeaderCache cache = new LogHeaderCache( 2 );

			  // when
			  cache.PutHeader( 5, 3 );
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final long logHeader = cache.getLogHeader(5);
			  long logHeader = cache.GetLogHeader( 5 ).Value;

			  // then
			  assertEquals( 3, logHeader );
		 }
Esempio n. 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldClearTheCache()
		 public virtual void ShouldClearTheCache()
		 {
			  // given
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.kernel.impl.transaction.log.LogHeaderCache cache = new org.neo4j.kernel.impl.transaction.log.LogHeaderCache(2);
			  LogHeaderCache cache = new LogHeaderCache( 2 );

			  // when
			  cache.PutHeader( 5, 3 );
			  cache.Clear();
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final System.Nullable<long> logHeader = cache.getLogHeader(5);
			  long? logHeader = cache.GetLogHeader( 5 );

			  // then
			  assertNull( logHeader );
		 }