@@ -0,0 +1,1926 @@
+/* LanguageTool, a natural language style checker %0A * Copyright (C) 2005 Daniel Naber (http://www.danielnaber.de)%0A * %0A * This library is free software; you can redistribute it and/or%0A * modify it under the terms of the GNU Lesser General Public%0A * License as published by the Free Software Foundation; either%0A * version 2.1 of the License, or (at your option) any later version.%0A *%0A * This library is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%0A * Lesser General Public License for more details.%0A *%0A * You should have received a copy of the GNU Lesser General Public%0A * License along with this library; if not, write to the Free Software%0A * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301%0A * USA%0A */%0A%0Apackage de.danielnaber.languagetool.rules.ru;%0A%0Aimport java.io.IOException;%0A%0Aimport junit.framework.TestCase;%0Aimport de.danielnaber.languagetool.JLanguageTool;%0Aimport de.danielnaber.languagetool.Language;%0Aimport de.danielnaber.languagetool.TestTools;%0Aimport de.danielnaber.languagetool.rules.RuleMatch;%0A%0A/*  %0A * RuSimpleReplaceRuleTest%0A * @ author Yakov Reztsov%0A *%0A */%0A%0A%0Apublic class RuSimpleReplaceRuleTest extends TestCase %7B%0A%0A%09public void testRule() throws IOException %7B%0A%09%09RuSimpleReplaceRule rule = new RuSimpleReplaceRule(TestTools.getMessages(%22ru%22));%0A%0A%09%09RuleMatch%5B%5D matches;%0A%09%09JLanguageTool langTool = new JLanguageTool(Language.RUSSIAN);%0A%09%09%0A%09%09// correct sentences:%0A%09%09matches = rule.match(langTool.getAnalyzedSentence(%22%D0%9A%D0%BD%D0%B8%D0%B3%D0%B0 %D0%B1%D1%8B%D0%BB%D0%B0 %D0%BF%D0%BE%D1%80%D0%B2%D0%B0%D0%BD%D0%B0.%22));%0A%09%09assertEquals(0, matches.length);%0A%0A%09%09// incorrect sentences:%0A%09%09matches = rule.match(langTool.getAnalyzedSentence(%22%D0%9A%D0%BD%D0%B8%D0%B3%D0%B0 %D0%B1%D1%8B%D0%BB%D0%B0 %D0%BF%D0%BE%D1%80%D0%B2%D0%B0%D1%82%D0%B0.%22));%0A%09%09assertEquals(1, matches.length);%0A%09%09assertEquals(1, matches%5B0%5D.getSuggestedReplacements().size());%0A%09%09assertEquals(%22%D0%BF%D0%BE%D1%80%D0%B2%D0%B0%D0%BD%D0%B0%22, matches%5B0%5D.getSuggestedReplacements().get(0));%0A%09%7D%0A%7D%0A

Add missing test.