From 4b19fb34aad71a81fdcd5e1bb6ff00a06386e5d9 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Mon, 11 Feb 2013 11:43:49 +0100 Subject: [PATCH] Add ResultSet#getRecords test --- src/test/org/yaz4j/ConnectionTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/org/yaz4j/ConnectionTest.java b/src/test/org/yaz4j/ConnectionTest.java index ca3d01c..056039b 100644 --- a/src/test/org/yaz4j/ConnectionTest.java +++ b/src/test/org/yaz4j/ConnectionTest.java @@ -3,6 +3,7 @@ package org.yaz4j; import org.junit.*; import static org.junit.Assert.*; import org.yaz4j.exception.*; +import java.util.List; public class ConnectionTest { @@ -37,6 +38,13 @@ public class ConnectionTest { } System.out.println("Try sorting them..."); s.sort("yaz", "1=4 >i 1=21 >s"); + System.out.println("Try fetching them all at once..."); + i = 0; + List all = s.getRecords(0, (int) s.getHitCount()); + for (Record r : all) { + System.out.println("getRecords, rec '"+i+"'"+r.getSyntax()); + i++; + } } catch (ZoomException ze) { fail(ze.getMessage()); } finally { -- 1.7.10.4