Created
May 20, 2012 10:14
-
-
Save fbiville/2757562 to your computer and use it in GitHub Desktop.
Tests of Gist https://t.co/hD8iMBLM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| public void when_plain_text_then_equal_text_returned() { | |
| assertThat(markupKiller.stripTags("10 < 9")).isEqualTo("10 < 9"); | |
| } | |
| @Test | |
| public void when_unbalanced_html_then_markup_removed() { | |
| assertThat(markupKiller.stripTags("<b>10 < 9")).isEqualTo("10 < 9"); | |
| assertThat(markupKiller.stripTags("<b id='whatever'>10 < 9<img />")).isEqualTo("10 < 9"); | |
| } | |
| @Test | |
| public void when_balanced_html_then_markup_removed() { | |
| assertThat(markupKiller.stripTags("<b>10 < 9</b>")).isEqualTo("10 < 9"); | |
| assertThat(markupKiller.stripTags("<b id='whatever'>10 < 9")).isEqualTo("10 < 9"); | |
| } | |
| @Test | |
| @Ignore("not supported and might be not needed") | |
| public void when_balanced_html_entities_then_markup_removed() { | |
| assertThat(markupKiller.stripTags("<b>10 < 9</b>")).isEqualTo("10 < 9"); | |
| assertThat(markupKiller.stripTags("<b id='whatever'>10 < 9")).isEqualTo("10 < 9"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
All your base are belong to GitHub