From 95de90fb03c551d27b1b70be86e52f6414a3a337 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Tue, 4 May 2010 16:01:04 +0200 Subject: [PATCH] Add scan test --- src/test/org/yaz4j/ConnectionTest.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/test/org/yaz4j/ConnectionTest.java b/src/test/org/yaz4j/ConnectionTest.java index cb2cab9..084d772 100644 --- a/src/test/org/yaz4j/ConnectionTest.java +++ b/src/test/org/yaz4j/ConnectionTest.java @@ -81,4 +81,24 @@ public class ConnectionTest { con.close(); } } + + @Test + public void testScan() { + System.out.println("Open connection to z3950cat.bl.uk:9909/BLAC"); + Connection con = new Connection("z3950cat.bl.uk:9909/BLAC", 0); + try { + con.connect(); + con.option("number", "20"); + ScanSet set = con.scan("@attr 1=21 \"development\""); + System.out.println("getSize(): " + set.getSize()); + assertEquals(20, set.getSize()); + + } catch (ZoomException ex) { + fail(ex.getMessage()); + } finally { + con.close(); + } + } + + } -- 1.7.10.4