Package org.neo4j.smack.pipeline.core

Examples of org.neo4j.smack.pipeline.core.WorkTransactionPreparer.prepare()


        TransactionWork txWork = mock(TransactionWork.class);
       
        when(txWork.getTransactionId()).thenReturn(-1l);
        when(txWork.isTransactional()).thenReturn(false);
       
        prepper.prepare(txWork);
       
        verify(txWork).setTransactionMode(WorkTransactionMode.NO_TRANSACTION);
       
        // TODO: Is it necessary that it generates a tx id for non-transactional work?
        verify(txWork).setTransactionId(0l);
View Full Code Here


        TransactionWork txWork = mock(TransactionWork.class);
       
        when(txWork.getTransactionId()).thenReturn(1l);
        when(txWork.isTransactional()).thenReturn(true);
       
        prepper.prepare(txWork);
       
        verify(txWork).setTransactionMode(WorkTransactionMode.OPEN_TRANSACTION);
        verify(txWork, never()).setTransactionId(anyLong());
    }
   
View Full Code Here

        TransactionWork txWork = mock(TransactionWork.class);
       
        when(txWork.getTransactionId()).thenReturn(-1l);
        when(txWork.isTransactional()).thenReturn(true);
       
        prepper.prepare(txWork);
       
        verify(txWork).setTransactionMode(WorkTransactionMode.SINGLE_TRANSACTION);
        verify(txWork).setTransactionId(anyLong());
    }
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.