Skip to content

Instantly share code, notes, and snippets.

@jmewes
Last active September 2, 2017 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmewes/cb9f93c155c546746d6dcf3cb4a03373 to your computer and use it in GitHub Desktop.
Save jmewes/cb9f93c155c546746d6dcf3cb4a03373 to your computer and use it in GitHub Desktop.
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."));
}
}
@jmewes
Copy link
Author

jmewes commented Sep 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment