@Test
public void test() {
BindParameterMapperManager parameterMapperManager = new BindParameterMapperManager();
Array jdbcArray = newProxy(Array.class);
Double[] array = { Double.valueOf(111.11d), Double.valueOf(222.22d) };
Connection conn = newProxy(Connection.class, (proxy, method, args) -> {
if (method.getName().equals("createArrayOf")) {
assertThat(args[0], is("FLOAT"));
assertThat(args[1], is(array));
return jdbcArray;
}
return method.invoke(proxy, args);
});
assertThat(parameterMapperManager.toJdbc(array, conn), is(jdbcArray));
Object[] objArray = { Double.valueOf(333.33d), "A" };
assertThat(parameterMapperManager.toJdbc(objArray, conn), is(objArray));
}
DoubleWrapperArrayParameterMapperTest.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:uroborosql
作者:
评论列表
文章目录