package com.github.bot.curiosone.core.nlp;

// SUPPRESS CHECKSTYLE AvoidStarImport
import static org.junit.Assert.*;

import org.junit.Test;

public class SpellingTest {
  @Test
  public void testGetInstance() {
    Spelling s = Spelling.getInstance();
    assertTrue(s instanceof Spelling);
  }

  @Test
  public void testCorrect() {
    Spelling s = Spelling.getInstance();
    assertEquals("hello", s.correct("hello"));
    assertEquals("hello", s.correct("helllo"));
    assertEquals("can", s.correct("cann"));
    assertEquals("helping", s.correct("heelping"));
    assertEquals("grow", s.correct("trow"));
    assertEquals("engineer", s.correct("enginer"));
    assertEquals("february", s.correct("febraury"));
    assertEquals("CORRECTME!", s.correct("CORRECTME!"));
    assertEquals("42", s.correct("42"));
  }
}

@@ -808,14 +808,120 @@
 %2242%22));%0A
+    assertEquals(%22accommodate%22, s.correct(%22accomodate%22));%0A    assertEquals(%22forty%22, s.correct(%22fourty%22));%0A
   %7D%0A%7D%0A

add new tests in SpellingTest