use of org.mule.runtime.api.streaming.object.CursorIterator in project mule by mulesoft.
the class DefaultStreamingHelperTestCase method resolveIteratorProvider.
@Test
public void resolveIteratorProvider() {
CursorIteratorProvider streamProvider = (CursorIteratorProvider) streamingHelper.resolveCursorProvider(valueList.iterator());
CursorIterator cursor = streamProvider.openCursor();
valueList.forEach(value -> {
assertThat(cursor.hasNext(), is(true));
assertThat(value, equalTo(cursor.next()));
});
assertThat(cursor.hasNext(), is(false));
}
use of org.mule.runtime.api.streaming.object.CursorIterator in project mule by mulesoft.
the class PagedOperationExecutionTestCase method emptyPagedOperation.
@Test
public void emptyPagedOperation() throws Exception {
CursorIterator iterator = getCursor("emptyPagedOperation");
assertThat(iterator.hasNext(), is(false));
assertThat(iterator.getSize(), is(0));
}
Aggregations