assertTrue(mmcs.getBoolean(2));
assertFalse(mmcs.wasNull());
}
public void testGetOutputParameter() throws Exception {
CallableStatementImpl mmcs = getCallableStatement();
RequestMessage request = new RequestMessage();
request.setExecutionId(1);
ResultsMessage resultsMsg = new ResultsMessage(request);
List[] results = new List[] {Arrays.asList(null, null, null), Arrays.asList(null, 1, 2)};
resultsMsg.setResults(results);
resultsMsg.setColumnNames(new String[] { "IntNum", "Out1", "Out2" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
resultsMsg.setDataTypes(new String[] { JDBCSQLTypeInfo.INTEGER, JDBCSQLTypeInfo.INTEGER, JDBCSQLTypeInfo.INTEGER });
resultsMsg.setFinalRow(results.length);
resultsMsg.setLastRow(results.length);
resultsMsg.setFirstRow(1);
resultsMsg.setParameters(Arrays.asList(new ParameterInfo(ParameterInfo.RESULT_SET, 1), new ParameterInfo(ParameterInfo.OUT, 1), new ParameterInfo(ParameterInfo.OUT, 1)));
mmcs.createResultSet(resultsMsg);
assertEquals(1, mmcs.getInt(1));
assertEquals(2, mmcs.getInt(2));
}