public virtual void TestConsumeWordInstance() { // we use the default locale, as its randomized by LuceneTestCase BreakIterator bi = BreakIterator.GetWordInstance(CultureInfo.CurrentCulture); var ci = CharArrayIterator.NewWordInstance(); for (var i = 0; i < 10000; i++) { var text = TestUtil.RandomUnicodeString(Random()).toCharArray(); ci.SetText(text, 0, text.Length); Consume(bi, ci); } }
public virtual void TestConsumeWordInstance() { // we use the default locale, as its randomized by LuceneTestCase var iteratorType = BreakIterator.UBreakIteratorType.WORD; var locale = new Locale("en", "US"); var ci = CharArrayIterator.NewWordInstance(); for (var i = 0; i < 10000; i++) { var text = TestUtil.RandomUnicodeString(Random()).toCharArray(); ci.SetText(text, 0, text.Length); Consume(iteratorType, locale, ci); } }
public virtual void TestWordInstance() { DoTests(CharArrayIterator.NewWordInstance()); }