Package org.neo4j.smack.pipeline.core.event

Examples of org.neo4j.smack.pipeline.core.event.TransactionWork


{
    @Test
    public void shouldSetNoTransactionIfNoTxIdAndNotTransactional()
    {
        WorkTransactionPreparer prepper = new WorkTransactionPreparer();
        TransactionWork txWork = mock(TransactionWork.class);
       
        when(txWork.getTransactionId()).thenReturn(-1l);
        when(txWork.isTransactional()).thenReturn(false);
       
        prepper.prepare(txWork);
       
        verify(txWork).setTransactionMode(WorkTransactionMode.NO_TRANSACTION);
       
View Full Code Here


   
    @Test
    public void shouldSetOpenTransactionToTransactionalWorkWithTxId()
    {
        WorkTransactionPreparer prepper = new WorkTransactionPreparer();
        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

   
    @Test
    public void shouldSetSingleTransactionToTransactionalWorkWithNoTxId()
    {
        WorkTransactionPreparer prepper = new WorkTransactionPreparer();
        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

Related Classes of org.neo4j.smack.pipeline.core.event.TransactionWork

Copyright © 2018 www.massapicom. 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.