/* LanguageTool, a natural language style checker
 * Copyright (C) 2012 Daniel Naber (http://www.danielnaber.de)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */
package org.languagetool.rules.spelling.hunspell;

import junit.framework.TestCase;
import org.languagetool.JLanguageTool;
import org.languagetool.language.GermanyGerman;
import org.languagetool.rules.RuleMatch;
import org.languagetool.rules.de.GermanSpellerRule;

import java.io.IOException;
import java.util.List;

public class SpellingCheckRuleTest extends TestCase {

  public void testIgnoreSuggestionsWithHunspell() throws IOException {
    final JLanguageTool langTool = new JLanguageTool(new GermanyGerman());

    final List<RuleMatch> matches = langTool.check("Das ist ein einPseudoWortFürLanguageToolTests");
    assertEquals(0, matches.size());   // no error, as this word is in ignore.txt

    final List<RuleMatch> matches2 = langTool.check("Das ist ein Tibbfehla");
    assertEquals(1, matches2.size());
    assertEquals(GermanSpellerRule.RULE_ID, matches2.get(0).getRule().getId());
  }

}

@@ -914,32 +914,22 @@
 ort 
+org.
 junit.
-framework.TestCase
+Test
 ;%0Aim
@@ -1159,16 +1159,104 @@
 .List;%0A%0A
+import static org.hamcrest.CoreMatchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0A
 public c
@@ -1286,27 +1286,18 @@
 est 
-extends TestCase %7B%0A
+%7B%0A%0A  @Test
 %0A  p
@@ -1368,22 +1368,16 @@
 n %7B%0A    
-final 
 JLanguag
@@ -1383,23 +1383,17 @@
 geTool l
-angTool
+t
  = new J
@@ -1436,48 +1436,21 @@
     
-final List%3CRuleMatch%3E matches = langTool
+assertThat(lt
 .che
@@ -1504,43 +1504,21 @@
 ts%22)
-;%0A    assertEquals(0, matches.size(
+.size(), is(0
 )); 
@@ -1571,14 +1571,8 @@
     
-final 
 List
@@ -1594,20 +1594,13 @@
 ches
-2
  = l
-angTool
+t
 .che
@@ -1642,33 +1642,34 @@
 sert
-Equals(1, 
+That(
 matches
-2
 .size()
+, is(1)
 );%0A 
@@ -1681,50 +1681,20 @@
 sert
-Equals(GermanSpellerRule.RULE_ID, 
+That(
 matches
-2
 .get
@@ -1714,16 +1714,47 @@
 .getId()
+, is(GermanSpellerRule.RULE_ID)
 );%0A  %7D%0A%0A

clean up test -> junit 4