Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
adapt test to commit 0689f4f0ae2907c35c080ea15b5ad406ea9402e7
Henschieab2768f79b7
diff --git a/test/java/net/yacy/document/WordTokenizerTest.java b/test/java/net/yacy/document/WordTokenizerTest.javaindex 7f4250953..4ca2bf147 100644--- a/test/java/net/yacy/document/WordTokenizerTest.java+++ b/test/java/net/yacy/document/WordTokenizerTest.java@@ -3,6 +3,9 @@ package net.yacy.document;import org.junit.Test;import static org.junit.Assert.*;+import org.hamcrest.CoreMatchers;+import org.hamcrest.MatcherAssert;+public class WordTokenizerTest {/**@@ -13,7 +16,8 @@ public class WordTokenizerTest {// test sentences containing 10x the word "word"String[] testTxtArr = new String[]{" word word..... (word) [word] . 'word word' \"word word\" word ? word! ",- "word-word word . [email protected] ....word... word,word "+ "word-word word . [email protected] ....word... word,word word word"+ // !! 12x the word "word" because "word-word" and "word,word" is one word};for (String testTxt : testTxtArr) {@@ -23,7 +27,10 @@ public class WordTokenizerTest {while (wt.hasMoreElements()) {StringBuilder sb = wt.nextElement();if (sb.length() > 1) { // skip punktuation- assertEquals("word", sb.toString());+ MatcherAssert.assertThat(sb.toString(),+ CoreMatchers.either(CoreMatchers.is("word"))+ .or(CoreMatchers.is("word-word"))+ .or(CoreMatchers.is("word,word")));cnt++;} else {assertTrue("punktuation", SentenceReader.punctuation(sb.charAt(0)));