Search in sources :

Example 6 with BoltResultHandle

use of org.neo4j.bolt.runtime.BoltResultHandle in project neo4j by neo4j.

the class TransactionStateMachineTest method newTransactionStateMachineSPI.

private static TransactionStateMachineSPI newTransactionStateMachineSPI(BoltTransaction transaction) throws KernelException {
    BoltResultHandle resultHandle = newResultHandle();
    TransactionStateMachineSPI stateMachineSPI = mock(TransactionStateMachineSPI.class);
    when(stateMachineSPI.beginTransaction(any(), any(), any(), any(), any(), any())).thenReturn(transaction);
    when(stateMachineSPI.executeQuery(any(), anyString(), any())).thenReturn(resultHandle);
    return stateMachineSPI;
}
Also used : BoltResultHandle(org.neo4j.bolt.runtime.BoltResultHandle) TransactionStateMachineSPI(org.neo4j.bolt.runtime.statemachine.TransactionStateMachineSPI)

Aggregations

BoltResultHandle (org.neo4j.bolt.runtime.BoltResultHandle)6 TransactionStateMachineSPI (org.neo4j.bolt.runtime.statemachine.TransactionStateMachineSPI)4 Test (org.junit.jupiter.api.Test)3 BoltTransaction (org.neo4j.bolt.dbapi.BoltTransaction)3