1 | public void testVariableExtraction6() throws Exception {↵ | | 1 | public void testDefaultValue() throws Exception {↵
|
2 | params = new LinkedList();↵ | | 2 | params = new LinkedList();↵
|
3 | params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));↵ | | 3 | params.add(new CompoundVariable("<value,, field=\"(pinposition\\d+)\">(\\d+)</value>"));↵
|
4 | params.add(new CompoundVariable("$2$"));↵ | | 4 | params.add(new CompoundVariable("$2$, "));↵
|
5 | params.add(new CompoundVariable("4"));↵ | | 5 | params.add(new CompoundVariable(".333"));↵
|
6 | params.add(new CompoundVariable(""));↵ | | 6 | params.add(new CompoundVariable(""));↵
|
7 | params.add(new CompoundVariable("default"));↵ | | 7 | params.add(new CompoundVariable("No Value Found"));↵
|
8 | variable.setParameters(params);↵ | | 8 | variable.setParameters(params);↵
|
9 | String match = variable.execute(result, null);↵ | | 9 | String match = variable.execute(result, null);↵
|
10 | assertEquals("default", match);↵ | | 10 | assertEquals("No Value Found", match);↵
|
11 | | | 11 |
|