]> gitweb.fperrin.net Git - DictionaryPC.git/blobdiff - src/com/hughes/android/dictionary/engine/DictionaryTest.java
Wiktionary upgrade!
[DictionaryPC.git] / src / com / hughes / android / dictionary / engine / DictionaryTest.java
index 0451c7e904d73c889f5d3ec21aaf9f85244b465f..53b3a916f692f303075ac0e5c16d39b4ffeea449 100644 (file)
@@ -21,6 +21,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import junit.framework.TestCase;
 
 import com.hughes.android.dictionary.engine.Index.IndexEntry;
+import com.hughes.util.ListUtil;
 
 
 public class DictionaryTest extends TestCase {
@@ -45,7 +46,7 @@ public class DictionaryTest extends TestCase {
     final Index enIndex = dict.indices.get(0);
     
     final RowBase row = enIndex.rows.get(4);
-    assertEquals("carbonyl chloride (the compound COCl<sub>2</sub>) (noun)\tossicloruro di carbonio", row.getRawText(false));
+    assertEquals("eagle (A gold coin with a face value of $10.00) (noun)\tmoneta di dieci dollari", row.getRawText(false));
 
     raf.close();
   }
@@ -60,9 +61,10 @@ public class DictionaryTest extends TestCase {
     
     assertEquals(2, dict.sources.size());
     assertEquals("chemnitz", dict.sources.get(0).name);
-    assertEquals(0, dict.sources.get(0).pairEntryStart);
     assertEquals("dictcc", dict.sources.get(1).name);
-    assertEquals(0, dict.sources.get(1).pairEntryStart);  // TODO: rethink this
+    
+    assertEquals("chemnitz", dict.pairEntries.get(0).entrySource.name);
+    assertEquals("dictcc", ListUtil.getLast(dict.pairEntries).entrySource.name);
     
     raf.close();
   }