Search in sources :

Example 1 with DbMeta

use of com.ctrip.platform.dal.dao.client.DbMeta in project dal by ctripcorp.

the class AutoMarkdownTest method mockDalConnection.

public DalConnection mockDalConnection() {
    DalConnection conn = EasyMock.createMock(DalConnection.class);
    DbMeta meta = EasyMock.createMock(DbMeta.class);
    EasyMock.expect(meta.getDataBaseKeyName()).andReturn(dbName).times(1);
    EasyMock.expect(meta.getDatabaseCategory()).andReturn(DatabaseCategory.MySql).times(1);
    EasyMock.expect(conn.getMeta()).andReturn(meta).times(3);
    EasyMock.replay(meta, conn);
    return conn;
}
Also used : DbMeta(com.ctrip.platform.dal.dao.client.DbMeta) DalConnection(com.ctrip.platform.dal.dao.client.DalConnection)

Aggregations

DalConnection (com.ctrip.platform.dal.dao.client.DalConnection)1 DbMeta (com.ctrip.platform.dal.dao.client.DbMeta)1