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;
}
Aggregations