Search in sources :

Example 6 with ProviderSqlSource

use of org.apache.ibatis.builder.annotation.ProviderSqlSource in project mybatis-3 by mybatis.

the class SqlProviderTest method methodNotFound.

@Test
public void methodNotFound() throws NoSuchMethodException {
    expectedException.expect(BuilderException.class);
    expectedException.expectMessage(is("Error creating SqlSource for SqlProvider. Method 'methodNotFound' not found in SqlProvider 'org.apache.ibatis.submitted.sqlprovider.SqlProviderTest$ErrorSqlBuilder'."));
    new ProviderSqlSource(new Configuration(), ErrorMapper.class.getMethod("methodNotFound").getAnnotation(SelectProvider.class));
}
Also used : SelectProvider(org.apache.ibatis.annotations.SelectProvider) Configuration(org.apache.ibatis.session.Configuration) ProviderSqlSource(org.apache.ibatis.builder.annotation.ProviderSqlSource) Test(org.junit.Test)

Aggregations

ProviderSqlSource (org.apache.ibatis.builder.annotation.ProviderSqlSource)6 Configuration (org.apache.ibatis.session.Configuration)6 Test (org.junit.Test)6 SelectProvider (org.apache.ibatis.annotations.SelectProvider)2