Last active
July 1, 2017 09:14
-
-
Save mkuehle/28fed39d3f115247cec7455fc9df38b5 to your computer and use it in GitHub Desktop.
static imports JUnit Test
This file contains 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
package de.ligahero.news.control; | |
import static org.hamcrest.CoreMatchers.equalTo; | |
import static org.hamcrest.MatcherAssert.assertThat; | |
import org.junit.Test; | |
public class HTMLBuddyTest { | |
@Test | |
public void formatText_shouldBeBold() { | |
String formatedText = new HTMLBuddy().init("a *b* c").formatText().build(); | |
assertThat(formatedText, equalTo("a <strong>b</strong> c")); | |
} | |
@Test | |
public void formatText_shouldBeStrikethrough() { | |
String formatedText = new HTMLBuddy().init("a ~b~ c").formatText().build(); | |
assertThat(formatedText, equalTo("a <span class=\"strike\">b</span> c")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment