[jsword-svn] r2116 - trunk/jsword/src/test/java/org/crosswire/jsword/book/sword

dmsmith at crosswire.org dmsmith at crosswire.org
Sat Mar 12 13:30:34 MST 2011


Author: dmsmith
Date: 2011-03-12 13:30:34 -0700 (Sat, 12 Mar 2011)
New Revision: 2116

Modified:
   trunk/jsword/src/test/java/org/crosswire/jsword/book/sword/GenBookTest.java
Log:
Improve testing

Modified: trunk/jsword/src/test/java/org/crosswire/jsword/book/sword/GenBookTest.java
===================================================================
--- trunk/jsword/src/test/java/org/crosswire/jsword/book/sword/GenBookTest.java	2011-03-12 20:29:39 UTC (rev 2115)
+++ trunk/jsword/src/test/java/org/crosswire/jsword/book/sword/GenBookTest.java	2011-03-12 20:30:34 UTC (rev 2116)
@@ -28,7 +28,7 @@
     protected void tearDown() throws Exception {
     }
 
-    public void testCreate() throws IOException, BookException {
+    public void testOsisID() throws IOException, BookException {
         Book book = Books.installed().getBook("Pilgrim"); // Bunyan's Pilgrim's Progress
         if (book != null) {
             Key key = null;
@@ -47,5 +47,14 @@
             }
         }
     }
+    
+    public void testCount() {
+        Book book = Books.installed().getBook("Pilgrim");
+        if (book != null) {
+            Key globalKeyList = book.getGlobalKeyList();
+            assertEquals("Incorrect number of keys in master list", 29, globalKeyList.getCardinality());
+            assertEquals("Incorrect number of top level keys", 6, globalKeyList.getChildCount());
+        }
+    }
 
 }




More information about the jsword-svn mailing list