Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void createRegularCommitProcess()
        public virtual void CreateRegularCommitProcess()
        {
            HighlyAvailableCommitProcessFactory factory = new HighlyAvailableCommitProcessFactory(new DelegateInvocationHandler <TransactionCommitProcess>(typeof(TransactionCommitProcess)));

            TransactionCommitProcess commitProcess = factory.Create(mock(typeof(TransactionAppender)), mock(typeof(StorageEngine)), Config.defaults());

            assertThat(commitProcess, not(instanceOf(typeof(ReadOnlyTransactionCommitProcess))));
            assertThat(Proxy.getInvocationHandler(commitProcess), instanceOf(typeof(DelegateInvocationHandler)));
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void createReadOnlyCommitProcess()
        public virtual void CreateReadOnlyCommitProcess()
        {
            HighlyAvailableCommitProcessFactory factory = new HighlyAvailableCommitProcessFactory(new DelegateInvocationHandler <TransactionCommitProcess>(typeof(TransactionCommitProcess)));

            Config config = Config.defaults(GraphDatabaseSettings.read_only, "true");

            TransactionCommitProcess commitProcess = factory.Create(mock(typeof(TransactionAppender)), mock(typeof(StorageEngine)), config);

            assertThat(commitProcess, instanceOf(typeof(ReadOnlyTransactionCommitProcess)));
        }