Skip to content

Instantly share code, notes, and snippets.

@rmannibucau
Created February 12, 2016 17:49
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 rmannibucau/0395a08d449a27e55ccc to your computer and use it in GitHub Desktop.
Save rmannibucau/0395a08d449a27e55ccc to your computer and use it in GitHub Desktop.
@RunWith(Parameterized.class)
public class SlugServiceTest {
@Rule
public final TestRule container = new SingleApplicationComposerRunner.Rule(this);
@Parameterized.Parameters(name = "{0}=>{1}")
public static String[][] parameters() {
return new String[][] {
{"Some Nice title", "some-nice-title"},
{"And with a , comma?", "and-with-a-comma"},
{"And with accént", "and-with-accent"}
};
}
@Inject
private SlugService slugService;
@Parameterized.Parameter(0)
public String original;
@Parameterized.Parameter(1)
public String expected;
@Test
public void isEquals() {
assertEquals(expected, slugService.slugFrom(original));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment