//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void testOffsets() throws Exception public virtual void testOffsets() { string input = "abc- def geh 1234- 5678-"; TokenStream ts = new MockTokenizer(new StringReader(input), MockTokenizer.WHITESPACE, false); ts = new HyphenatedWordsFilter(ts); assertTokenStreamContents(ts, new string[] {"abcdef", "geh", "12345678-"}, new int[] {0, 9, 13}, new int[] {8, 12, 24}); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void testOffsets() throws Exception public virtual void testOffsets() { string input = "abc- def geh 1234- 5678-"; TokenStream ts = new MockTokenizer(new StringReader(input), MockTokenizer.WHITESPACE, false); ts = new HyphenatedWordsFilter(ts); assertTokenStreamContents(ts, new string[] { "abcdef", "geh", "12345678-" }, new int[] { 0, 9, 13 }, new int[] { 8, 12, 24 }); }
/// <summary> /// Test that HyphenatedWordsFilter behaves correctly with a final hyphen /// </summary> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void testHyphenAtEnd() throws Exception public virtual void testHyphenAtEnd() { string input = "ecologi-\r\ncal devel-\r\n\r\nop compre-\u0009hensive-hands-on and ecology-"; // first test TokenStream ts = new MockTokenizer(new StringReader(input), MockTokenizer.WHITESPACE, false); ts = new HyphenatedWordsFilter(ts); assertTokenStreamContents(ts, new string[] {"ecological", "develop", "comprehensive-hands-on", "and", "ecology-"}); }
/// <summary> /// Test that HyphenatedWordsFilter behaves correctly with a final hyphen /// </summary> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void testHyphenAtEnd() throws Exception public virtual void testHyphenAtEnd() { string input = "ecologi-\r\ncal devel-\r\n\r\nop compre-\u0009hensive-hands-on and ecology-"; // first test TokenStream ts = new MockTokenizer(new StringReader(input), MockTokenizer.WHITESPACE, false); ts = new HyphenatedWordsFilter(ts); assertTokenStreamContents(ts, new string[] { "ecological", "develop", "comprehensive-hands-on", "and", "ecology-" }); }