Search in sources :

Example 6 with SqlMapClient

use of com.ibatis.sqlmap.client.SqlMapClient in project pinpoint by naver.

the class SqlMapClientIT method queryForMapShouldBeTraced.

@Test
public void queryForMapShouldBeTraced() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyQueryForMap(sqlMapClient);
}
Also used : SqlMapClientImpl(com.ibatis.sqlmap.engine.impl.SqlMapClientImpl) SqlMapClient(com.ibatis.sqlmap.client.SqlMapClient) Test(org.junit.Test)

Example 7 with SqlMapClient

use of com.ibatis.sqlmap.client.SqlMapClient in project pinpoint by naver.

the class SqlMapClientIT method queryForObjectShouldBeTraced.

@Test
public void queryForObjectShouldBeTraced() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyQueryForObject(sqlMapClient);
}
Also used : SqlMapClientImpl(com.ibatis.sqlmap.engine.impl.SqlMapClientImpl) SqlMapClient(com.ibatis.sqlmap.client.SqlMapClient) Test(org.junit.Test)

Example 8 with SqlMapClient

use of com.ibatis.sqlmap.client.SqlMapClient in project generator by mybatis.

the class MiscellaneousTest method testAnotherAwfulTableInsert.

@Test
public void testAnotherAwfulTableInsert() {
    SqlMapClient sqlMap = getSqlMapClient();
    try {
        Anotherawfultable record = new Anotherawfultable();
        record.setId(5);
        record.setSelect("select");
        record.setInsert("insert");
        sqlMap.insert("MBGTEST_ANOTHERAWFULTABLE.insert", record);
        Anotherawfultable key = new Anotherawfultable();
        key.setId(5);
        Anotherawfultable returnedRecord = (Anotherawfultable) sqlMap.queryForObject("MBGTEST_ANOTHERAWFULTABLE.selectByPrimaryKey", key);
        assertEquals(record.getId(), returnedRecord.getId());
        assertEquals(record.getSelect(), returnedRecord.getSelect());
        assertEquals(record.getInsert(), returnedRecord.getInsert());
        assertEquals(record.getUpdate(), returnedRecord.getUpdate());
        assertEquals(record.getDelete(), returnedRecord.getDelete());
    } catch (SQLException e) {
        fail(e.getMessage());
    }
}
Also used : Anotherawfultable(mbg.test.ib2j5.generated.miscellaneous.model.Anotherawfultable) SQLException(java.sql.SQLException) SqlMapClient(com.ibatis.sqlmap.client.SqlMapClient) Test(org.junit.Test)

Example 9 with SqlMapClient

use of com.ibatis.sqlmap.client.SqlMapClient in project pinpoint by naver.

the class SqlMapClientIT method deleteShouldBeTraced.

@Test
public void deleteShouldBeTraced() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyDelete(sqlMapClient);
}
Also used : SqlMapClientImpl(com.ibatis.sqlmap.engine.impl.SqlMapClientImpl) SqlMapClient(com.ibatis.sqlmap.client.SqlMapClient) Test(org.junit.Test)

Example 10 with SqlMapClient

use of com.ibatis.sqlmap.client.SqlMapClient in project pinpoint by naver.

the class SqlMapClientIT method methodCallWithNullSqlIdShouldOnlyTraceMethodName.

@Test
public void methodCallWithNullSqlIdShouldOnlyTraceMethodName() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyInsertWithNullSqlId(sqlMapClient);
}
Also used : SqlMapClientImpl(com.ibatis.sqlmap.engine.impl.SqlMapClientImpl) SqlMapClient(com.ibatis.sqlmap.client.SqlMapClient) Test(org.junit.Test)

Aggregations

SqlMapClient (com.ibatis.sqlmap.client.SqlMapClient)15 Test (org.junit.Test)9 SqlMapClientImpl (com.ibatis.sqlmap.engine.impl.SqlMapClientImpl)8 SQLException (java.sql.SQLException)1 Anotherawfultable (mbg.test.ib2j5.generated.miscellaneous.model.Anotherawfultable)1