use of org.languagetool.rules.MultipleWhitespaceRule in project languagetool by languagetool-org.
the class MultipleWhitespaceRuleTest method testRule.
@Test
public void testRule() throws IOException {
final MultipleWhitespaceRule rule = new MultipleWhitespaceRule(TestTools.getEnglishMessages(), new Polish());
final JLanguageTool langTool = new JLanguageTool(new Polish());
assertEquals(0, rule.match(langTool.getAnalyzedSentence("To jest test.")).length);
assertEquals(1, rule.match(langTool.getAnalyzedSentence("To jest test.")).length);
}
Aggregations