1 | params.add(new CompoundVariable("$1$"));↵ | | 1 | params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));↵
|
2 | params.add(new CompoundVariable("ALL"));↵ | | 2 | params.add(new CompoundVariable("$2$"));↵
|
3 | params.add(new CompoundVariable("_"));↵ | | 3 | params.add(new CompoundVariable("2"));↵
|
4 | variable.setParameters(params);↵ | | 4 | variable.setParameters(params);↵
|
5 | String match = variable.execute(result, null);↵ | | 5 | String match = variable.execute(result, null);↵
|
6 | assertEquals("pinposition1_pinposition2_pinposition3", match);↵ | | 6 | assertEquals("↵
|
7 | }↵ | | |
|
|
8 | ↵ | | 7 | 5", match);↵
|
| | | 8 | }↵
|
|
| | | 9 | // Test with output variable name↵
|
9 | public void testVariableExtraction6() throws Exception {↵ | | 10 | public void testVariableExtraction1a() throws Exception {↵
|
10 | params = new LinkedList();↵ | | 11 | params = new LinkedList();↵
|
11 | params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));↵ | | 12 | params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));↵
|
12 | params.add(new CompoundVariable("$2$"));↵ | | 13 | params.add(new CompoundVariable("$2$"));↵
|
13 | ↵ | | 14 | // template↵
|
14 | params.add(new CompoundVariable("4"));↵ | | 15 | params.add(new CompoundVariable("2"));↵
|
15 | ↵ | | 16 | // match number↵
|
16 | params.add(new CompoundVariable("")) | | 17 | params.add(new CompoundVariable("-"))
|