//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void testRandomStrings() throws java.io.IOException public virtual void testRandomStrings() { for (int i = 0; i < 10000; i++) { string text = TestUtil.randomUnicodeString(random(), 100); int min = TestUtil.Next(random(), 0, 100); int max = TestUtil.Next(random(), 0, 100); int count = text.codePointCount(0, text.Length); if (min > max) { int temp = min; min = max; max = temp; } bool expected = count >= min && count <= max; TokenStream stream = new KeywordTokenizer(new StringReader(text)); stream = new CodepointCountFilter(TEST_VERSION_CURRENT, stream, min, max); stream.reset(); assertEquals(expected, stream.incrementToken()); stream.end(); stream.close(); } }