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

import static org.assertj.core.api.Assertions.assertThat;
// SUPPRESS CHECKSTYLE AvoidStarImport
import static org.junit.Assert.*;

import org.junit.Test;

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

  @Test
  public void testCorrect() {
    Spelling s = Spelling.getInstance();
    assertThat(s.correct("hello")).isEqualTo("hello");

    assertThat(s.correct("hel lo")).isEqualTo("hello");

    assertThat(s.correct("hello,")).isEqualTo("hello");

    assertThat(s.correct(",hello")).isEqualTo("hello");

    assertThat(s.correct("helllo")).isEqualTo("hello");

    assertThat(s.correct("cann")).isEqualTo("can");

    assertThat(s.correct("ca.n")).isEqualTo("can");

    assertThat(s.correct("ca3n")).isEqualTo("can");

    assertThat(s.correct("c4n")).isEqualTo("can");

    assertThat(s.correct("can1")).isEqualTo("can");

    assertThat(s.correct("!can")).isEqualTo("can");

    assertThat(s.correct("united kingdom")).isEqualTo("united kingdom");
  }
}

@@ -98,81 +98,8 @@
 hat;
-%0A// SUPPRESS CHECKSTYLE AvoidStarImport%0Aimport static org.junit.Assert.*;
 %0A%0Aim
@@ -148,18 +148,16 @@
 gTest %7B%0A
-  
 %0A  @Test

remove useless import SpellingTest