Last active
September 2, 2017 13:40
-
-
Save jmewes/cb9f93c155c546746d6dcf3cb4a03373 to your computer and use it in GitHub Desktop.
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
import org.junit.Test; | |
import static org.hamcrest.CoreMatchers.is; | |
import static org.junit.Assert.assertThat; | |
public class StringTest { | |
@Test | |
public void should_format_string() { | |
String formattedString = String.format("%s, %s, %s.", "a", "b", "c"); | |
assertThat(formattedString, is("a, b, c.")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html