Java Code Examples for com.github.davidmoten.guavamini.Lists#newArrayList()

The following examples show how to use com.github.davidmoten.guavamini.Lists#newArrayList() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UtilTest.java    From rxjava2-jdbc with Apache License 2.0 5 votes vote down vote up
@Test(expected = SQLException.class)
public void testPsThrowsInSetParameters() throws SQLException {
    boolean namesAllowed = true;
    List<Parameter> list = Lists.newArrayList(Parameter.create("name", "FRED"));
    PreparedStatement ps = Mockito.mock(PreparedStatement.class);
    try {
        Mockito.doThrow(new SQLException("boo")) //
                .when(ps) //
                .setObject(Mockito.anyInt(), Mockito.any());
        Util.setParameters(ps, list, namesAllowed);
    } finally {
        Mockito.verify(ps, Mockito.atMost(1)).setObject(Mockito.anyInt(), Mockito.any());
    }
}
 
Example 2
Source File: SqlInfoTest.java    From rxjava2-jdbc with Apache License 2.0 5 votes vote down vote up
@Test
public void testExpansionWithParametersCollectionPresent() {
    Parameter p1 = new Parameter(12);
    Parameter p2 = new Parameter(Lists.newArrayList(1, 2, 3));
    SqlInfo s = SqlInfo.parse("? hello ?", Lists.newArrayList(p1, p2));
    assertEquals("? hello ?,?,?", s.sql());
}
 
Example 3
Source File: CallableBuilder.java    From rxjava2-jdbc with Apache License 2.0 4 votes vote down vote up
public CallableBuilderN inOut(Type type, Class<T3> cls5) {
    b.inOut(type, cls5);
    return new CallableBuilderN(b, Lists.newArrayList(cls1, cls2, cls3, cls4, cls5));
}
 
Example 4
Source File: CallableBuilder.java    From rxjava2-jdbc with Apache License 2.0 4 votes vote down vote up
public CallableBuilderN out(Type type, Class<?> cls5) {
    b.out(type, cls5);
    return new CallableBuilderN(b, Lists.newArrayList(cls1, cls2, cls3, cls4, cls5));
}
 
Example 5
Source File: CallableBuilder.java    From rxjava2-jdbc with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public CallableResultSetsNBuilder get(Function<? super ResultSet, ?> f5) {
    return new CallableResultSetsNBuilder(b, Lists.newArrayList(f1, f2, f3, f4, f5));
}
 
Example 6
Source File: TransactedCallableBuilder.java    From rxjava2-jdbc with Apache License 2.0 4 votes vote down vote up
public CallableBuilderN inOut(Type type, Class<T3> cls5) {
    b.inOut(type, cls5);
    return new CallableBuilderN(b, Lists.newArrayList(cls1, cls2, cls3, cls4, cls5));
}
 
Example 7
Source File: TransactedCallableBuilder.java    From rxjava2-jdbc with Apache License 2.0 4 votes vote down vote up
public CallableBuilderN out(Type type, Class<?> cls5) {
    b.out(type, cls5);
    return new CallableBuilderN(b, Lists.newArrayList(cls1, cls2, cls3, cls4, cls5));
}
 
Example 8
Source File: TransactedCallableBuilder.java    From rxjava2-jdbc with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public CallableResultSetsNBuilder get(Function<? super ResultSet, ?> f5) {
    return new CallableResultSetsNBuilder(b, Lists.newArrayList(f1, f2, f3, f4, f5));
}