[jsword-svn] r1983 - in trunk/jsword/src/test/java/org/crosswire/jsword: bridge index/lucene/analysis

dmsmith at crosswire.org dmsmith at crosswire.org
Sun Feb 21 12:05:56 MST 2010


Author: dmsmith
Date: 2010-02-21 12:05:55 -0700 (Sun, 21 Feb 2010)
New Revision: 1983

Modified:
   trunk/jsword/src/test/java/org/crosswire/jsword/bridge/DwrBridgeTest.java
   trunk/jsword/src/test/java/org/crosswire/jsword/index/lucene/analysis/ConfigurableSnowballAnalyzerTest.java
Log:
Fixed failing tests.

Modified: trunk/jsword/src/test/java/org/crosswire/jsword/bridge/DwrBridgeTest.java
===================================================================
--- trunk/jsword/src/test/java/org/crosswire/jsword/bridge/DwrBridgeTest.java	2010-02-21 16:12:51 UTC (rev 1982)
+++ trunk/jsword/src/test/java/org/crosswire/jsword/bridge/DwrBridgeTest.java	2010-02-21 19:05:55 UTC (rev 1983)
@@ -23,6 +23,7 @@
 
 import org.crosswire.jsword.book.BookException;
 import org.crosswire.jsword.passage.NoSuchKeyException;
+import org.crosswire.jsword.versification.BibleInfo;
 
 import junit.framework.TestCase;
 
@@ -39,6 +40,7 @@
     DwrBridge dwrBridge = new DwrBridge();
 
     protected void setUp() {
+        BibleInfo.setFullBookName(true);
     }
 
     public void testGetBooks() {
@@ -53,12 +55,10 @@
         try {
             String verse = dwrBridge.getOSISString("KJV", "Gen 1:1", 0, 100); //$NON-NLS-1$ //$NON-NLS-2$
             assertEquals(
-                    verse,
-                    "<div><title type=\"x-gen\">Genesis 1:1</title><verse osisID=\"Gen.1.1\"><w lemma=\"strong:H07225\">In the beginning</w> <w lemma=\"strong:H0430\">God</w> <w lemma=\"strong:H0853 strong:H01254\" morph=\"strongMorph:TH8804\">created</w> <w lemma=\"strong:H08064\">the heaven</w> <w lemma=\"strong:H0853\">and</w> <w lemma=\"strong:H0776\">the earth</w>.</verse></div>"); //$NON-NLS-1$
+                    "<div><title type=\"x-gen\">Genesis 1:1</title><verse osisID=\"Gen.1.1\"><w lemma=\"strong:H07225\">In the beginning</w> <w lemma=\"strong:H0430\">God</w> <w lemma=\"strong:H0853 strong:H01254\" morph=\"strongMorph:TH8804\">created</w> <w lemma=\"strong:H08064\">the heaven</w> <w lemma=\"strong:H0853\">and</w> <w lemma=\"strong:H0776\">the earth</w>.</verse></div>", verse); //$NON-NLS-1$
             String hdef = dwrBridge.getOSISString("StrongsHebrew", "H07225", 0, 100); //$NON-NLS-1$ //$NON-NLS-2$
             assertEquals(
-                    hdef,
-                    "<div><title>07225</title>7225  re'shiyth  ray-sheeth'\r<lb></lb>\r<lb></lb> from the same as 7218; the first, in place, time, order or\r<lb></lb> rank (specifically, a firstfruit):--beginning, chief(-est),\r<lb></lb> first(-fruits, part, time), principal thing.\r<lb></lb> see HEBREW for 07218</div>"); //$NON-NLS-1$
+                    "<div><title>07225</title>7225  re'shiyth  ray-sheeth'\r<lb></lb>\r<lb></lb> from the same as 7218; the first, in place, time, order or\r<lb></lb> rank (specifically, a firstfruit):--beginning, chief(-est),\r<lb></lb> first(-fruits, part, time), principal thing.\r<lb></lb> see HEBREW for 07218</div>", hdef); //$NON-NLS-1$
         } catch (BookException e) {
             fail(e.getDetailedMessage());
         } catch (NoSuchKeyException e) {

Modified: trunk/jsword/src/test/java/org/crosswire/jsword/index/lucene/analysis/ConfigurableSnowballAnalyzerTest.java
===================================================================
--- trunk/jsword/src/test/java/org/crosswire/jsword/index/lucene/analysis/ConfigurableSnowballAnalyzerTest.java	2010-02-21 16:12:51 UTC (rev 1982)
+++ trunk/jsword/src/test/java/org/crosswire/jsword/index/lucene/analysis/ConfigurableSnowballAnalyzerTest.java	2010-02-21 19:05:55 UTC (rev 1983)
@@ -64,7 +64,7 @@
 
         myAnalyzer.pickStemmer("French"); //$NON-NLS-1$
 
-        String testInput = " tant aimŽ le monde qu'il a donnŽ son"; //$NON-NLS-1$
+        String testInput = " tant aimé le monde qu'il a donné son"; //$NON-NLS-1$
 
         Query query = parser.parse(testInput);
         assertTrue(query.toString().indexOf(field + ":aim ") > -1); //$NON-NLS-1$
@@ -76,7 +76,7 @@
 
         myAnalyzer.pickStemmer("French"); //$NON-NLS-1$
         myAnalyzer.setDoStopWords(true);
-        String testInput = " tant aim� le monde qu 'il a donn� son"; //$NON-NLS-1$
+        String testInput = " tant aimé le monde qu 'il a donné son"; //$NON-NLS-1$
 
         Query query = parser.parse(testInput);
         assertTrue(query.toString().indexOf(field + ":le") == -1); //$NON-NLS-1$
@@ -89,12 +89,12 @@
         myAnalyzer.pickStemmer("French"); //$NON-NLS-1$
         myAnalyzer.setDoStemming(false);
 
-        String testInput = " tant aimŽ le monde qu'il a donnŽ son"; //$NON-NLS-1$
+        String testInput = " tant aimé le monde qu'il a donné son"; //$NON-NLS-1$
 
         Query query = parser.parse(testInput);
         // System.out.println(query.toString());
-        assertTrue(query.toString().indexOf(field + ":aimŽ ") > -1); //$NON-NLS-1$
-        assertTrue(query.toString().indexOf(field + ":donnŽ ") > -1); //$NON-NLS-1$
+        assertTrue(query.toString().indexOf(field + ":aimé ") > -1); //$NON-NLS-1$
+        assertTrue(query.toString().indexOf(field + ":donné ") > -1); //$NON-NLS-1$
     }
 
     public void testStemmerConfig() throws ParseException {
@@ -102,11 +102,11 @@
         myAnalyzer.pickStemmer("French"); //$NON-NLS-1$
         myAnalyzer.setDoStemming(false);
 
-        String testInput = " tant aimŽ le monde qu'il a donnŽ son"; //$NON-NLS-1$
+        String testInput = " tant aimé le monde qu'il a donné son"; //$NON-NLS-1$
 
         Query query = parser.parse(testInput);
-        assertTrue(query.toString().indexOf(field + ":aimŽ ") > -1); //$NON-NLS-1$
-        assertTrue(query.toString().indexOf(field + ":donnŽ ") > -1); //$NON-NLS-1$
+        assertTrue(query.toString().indexOf(field + ":aimé ") > -1); //$NON-NLS-1$
+        assertTrue(query.toString().indexOf(field + ":donné ") > -1); //$NON-NLS-1$
 
     }
 
@@ -114,7 +114,7 @@
 
         myAnalyzer.pickStemmer("German"); //$NON-NLS-1$
 
-        String testInput = "Denn also hat Gott die Welt geliebt, da§ er seinen eingeborenen Sohn gab, auf da§ jeder, der an ihn glaubt, nicht verloren gehe, sondern ewiges Leben habe"; //$NON-NLS-1$
+        String testInput = "Denn also hat Gott die Welt geliebt, daß er seinen eingeborenen Sohn gab, auf daß jeder, der an ihn glaubt, nicht verloren gehe, sondern ewiges Leben habe"; //$NON-NLS-1$
 
         Query query = parser.parse(testInput);
         assertTrue(query.toString().indexOf(field + ":denn ") > -1); //$NON-NLS-1$




More information about the jsword-svn mailing list