use of javax.resource.spi.ConnectionEventListener in project cxf by apache.
the class ManagedConnectionImplTest method testSendEventTxRolledBack.
@Test
public void testSendEventTxRolledBack() throws Exception {
ConnectionEvent event = new ConnectionEvent(mc, ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK);
ConnectionEventListener listener = EasyMock.createMock(ConnectionEventListener.class);
mc.addConnectionEventListener(listener);
EasyMock.reset(listener);
listener.localTransactionRolledback(EasyMock.isA(ConnectionEvent.class));
EasyMock.expectLastCall();
EasyMock.replay(listener);
mc.sendEvent(event);
}
use of javax.resource.spi.ConnectionEventListener in project cxf by apache.
the class ManagedConnectionImplTest method testSendEventTxCommitted.
@Test
public void testSendEventTxCommitted() throws Exception {
ConnectionEvent event = new ConnectionEvent(mc, ConnectionEvent.LOCAL_TRANSACTION_COMMITTED);
ConnectionEventListener listener = EasyMock.createMock(ConnectionEventListener.class);
mc.addConnectionEventListener(listener);
listener.localTransactionCommitted(EasyMock.isA(ConnectionEvent.class));
EasyMock.expectLastCall();
EasyMock.replay(listener);
mc.sendEvent(event);
EasyMock.verify(listener);
}
Aggregations