예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldAccessExampleMetaData()
        public virtual void ShouldAccessExampleMetaData()
        {
            EmbeddedProxySPI spi = mock(typeof(EmbeddedProxySPI));
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.kernel.impl.api.KernelTransactionImplementation transaction = mock(org.neo4j.kernel.impl.api.KernelTransactionImplementation.class);
            KernelTransactionImplementation transaction = mock(typeof(KernelTransactionImplementation));

            when(transaction.MetaData).thenReturn(genericMap("username", "Igor"));
            TxStateTransactionDataSnapshot transactionDataSnapshot = new TxStateTransactionDataSnapshot(_state, spi, _ops, transaction);

            assertEquals(1, transactionDataSnapshot.MetaData().Count);
            assertThat("Expected metadata map to contain defined username", transactionDataSnapshot.MetaData(), equalTo(genericMap("username", "Igor")));
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldAccessEmptyMetaData()
        public virtual void ShouldAccessEmptyMetaData()
        {
            TxStateTransactionDataSnapshot transactionDataSnapshot = Snapshot();

            assertEquals(0, transactionDataSnapshot.MetaData().Count);
        }