use of io.shardingjdbc.core.merger.fixture.TestQueryResult in project sharding-jdbc by shardingjdbc.
the class RowNumberDecoratorMergedResultTest method setUp.
@Before
public void setUp() throws SQLException {
ResultSet resultSet = mock(ResultSet.class);
ResultSetMetaData resultSetMetaData = mock(ResultSetMetaData.class);
when(resultSet.getMetaData()).thenReturn(resultSetMetaData);
List<ResultSet> resultSets = Lists.newArrayList(resultSet, mock(ResultSet.class), mock(ResultSet.class), mock(ResultSet.class));
for (ResultSet each : resultSets) {
when(each.next()).thenReturn(true, true, false);
}
queryResults = new ArrayList<>(resultSets.size());
for (ResultSet each : resultSets) {
queryResults.add(new TestQueryResult(each));
}
selectStatement = new SelectStatement();
}
use of io.shardingjdbc.core.merger.fixture.TestQueryResult in project sharding-jdbc by shardingjdbc.
the class TopAndRowNumberDecoratorMergedResultTest method setUp.
@Before
public void setUp() throws SQLException {
ResultSet resultSet = mock(ResultSet.class);
ResultSetMetaData resultSetMetaData = mock(ResultSetMetaData.class);
when(resultSet.getMetaData()).thenReturn(resultSetMetaData);
List<ResultSet> resultSets = Lists.newArrayList(resultSet, mock(ResultSet.class), mock(ResultSet.class), mock(ResultSet.class));
for (ResultSet each : resultSets) {
when(each.next()).thenReturn(true, true, false);
}
queryResults = new ArrayList<>(resultSets.size());
for (ResultSet each : resultSets) {
queryResults.add(new TestQueryResult(each));
}
selectStatement = new SelectStatement();
}
Aggregations