Implement iterable on result set
[yaz4j-moved-to-github.git] / src / test / org / yaz4j / ConnectionTest.java
index abeca8f..e577707 100644 (file)
@@ -27,6 +27,14 @@ public class ConnectionTest {
       assertEquals(content[0], 103);
       assertEquals(rec.getSyntax(), "SUTRS");
       assertEquals(rec.getDatabase(), "gils");
+      System.out.println("Read all records..");
+      // read all records
+      int i = 0;
+      for (Record r : s) {
+        assertNotNull(r);
+        System.out.println("Got "+i+" record of type "+r.getSyntax());
+        i++;
+      }
     } catch (ZoomException ze) {
       fail(ze.getMessage());
     } finally {
@@ -34,6 +42,7 @@ public class ConnectionTest {
     }
   }
 
+
   @Test
   public void unsupportedSyntax() {
     System.out.println("Open connection to z3950.loc.gov:7090/voyager...");