Last change
on this file was 1, checked in by Wouter Pasman, 6 years ago |
Initial import : Genius 9.0.0
|
File size:
868 bytes
|
Line | |
---|
1 | package genius.misc;
|
---|
2 |
|
---|
3 | import static org.junit.Assert.assertEquals;
|
---|
4 |
|
---|
5 | import java.util.Arrays;
|
---|
6 | import java.util.Collection;
|
---|
7 |
|
---|
8 | import org.junit.Test;
|
---|
9 | import org.junit.runner.RunWith;
|
---|
10 | import org.junit.runners.Parameterized;
|
---|
11 | import org.junit.runners.Parameterized.Parameters;
|
---|
12 |
|
---|
13 | import genius.core.misc.StringUtils;
|
---|
14 |
|
---|
15 | @RunWith(Parameterized.class)
|
---|
16 | public class StringUtilsTest {
|
---|
17 |
|
---|
18 | @Parameters
|
---|
19 | public static Collection<Object[]> data() {
|
---|
20 | return Arrays
|
---|
21 | .asList(new Object[][] { { "Party 1", "Party 2" }, { "11", "12" }, { "-12", "-13" }, { "P1", "P2" },
|
---|
22 | { "P-13", "P-14" }, { "#@&*1", "#@&*2" }, { "p", "p1" }, { "1p", "1p1" }, { "1p9", "1p10" } });
|
---|
23 | }
|
---|
24 |
|
---|
25 | private String in;
|
---|
26 | private String out;
|
---|
27 |
|
---|
28 | public StringUtilsTest(String in, String out) {
|
---|
29 | this.in = in;
|
---|
30 | this.out = out;
|
---|
31 | }
|
---|
32 |
|
---|
33 | @Test
|
---|
34 | public void test() {
|
---|
35 | assertEquals(out, StringUtils.increment(in));
|
---|
36 | }
|
---|
37 |
|
---|
38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.