Examples of Savepoint


Examples of java.sql.Savepoint

  @Test
  public void testTransactionManagerRollback() throws Exception {
    ConnectionSource connectionSource = createMock(ConnectionSource.class);
    DatabaseConnection conn = createMock(DatabaseConnection.class);
    expect(conn.isAutoCommitSupported()).andReturn(false);
    Savepoint savePoint = createMock(Savepoint.class);
    expect(savePoint.getSavepointName()).andReturn("name").anyTimes();
    expect(conn.setSavePoint(isA(String.class))).andReturn(savePoint);
    conn.rollback(savePoint);
    expect(connectionSource.getDatabaseType()).andReturn(databaseType);
    expect(connectionSource.getReadWriteConnection()).andReturn(conn);
    expect(connectionSource.saveSpecialConnection(conn)).andReturn(true);
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.