package net.bavrd.unit;

import java.util.Map;

import org.jsoup.Jsoup;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import net.bavrd.core.Face;
import net.bavrd.faces.SlackFace;

public class FormattedTextUnitTest {

  @Test
  public void testSlackFormatter() {
    SlackFace sf = new SlackFace();

    String inputString = "<img src='http://upload.wikimedia.org/wikipedia/commons/7/72/Torchlight_help_icon.svg' alt='Help Icon'/><br/>"
        + "<b>The following commands are available for <i>bot</i></b>:"
        + "<br/><code>command1</code> - description of command 1";

    String expectedOutput = "<http://upload.wikimedia.org/wikipedia/commons/7/72/Torchlight_help_icon.svg|Help Icon>"
        + "\n*The following commands are available for _bot_*:"
        + "\n`command1` - description of command 1";

    Assert.assertEquals(expectedOutput, sf.sanitizeRichText(inputString));
  }
}

@@ -29,149 +29,49 @@
 ort 
-java.util.Map;%0A%0Aimport org.jsoup.Jsoup;%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport net.bavrd.core.Face;
+org.junit.Assert;%0Aimport org.junit.Test;%0A
 %0Aimp
@@ -782,20 +782,14 @@
  sf.
-sanitizeRich
+format
 Text

fix test not updated after method renaming