- @Test
- public final void testRegexp() {
- // Setup
- String testVal = "testVal";
- String testId = "function:testId";
- IdentifierImpl testFnId = new IdentifierImpl(testId);
- Identifier identifier = XACML.ID_DATATYPE_STRING;
- StdAttributeValue<String> attValue = new StdAttributeValue<String>(identifier, testVal);
- FunctionArgument fArg = new FunctionArgumentAttributeValue(attValue);
- List<FunctionArgument> listFA = new ArrayList<FunctionArgument>();
- listFA.add(fArg);
- listFA.add(fArg);
-
- // Try a match
- FunctionDefinitionCustomRegexpMatch<String> regexpMatch = new FunctionDefinitionCustomRegexpMatch<String>(testFnId, DataTypes.DT_STRING);
- ExpressionResult result = regexpMatch.evaluate(null, listFA);
- assertEquals(result.getStatus().isOk(), true);
- }
+ @Test
+ public final void testRegexp() {
+ // Setup
+ final String testVal = "testVal";
+ final String testId = "function:testId";
+ final IdentifierImpl testFnId = new IdentifierImpl(testId);
+ final Identifier identifier = XACML.ID_DATATYPE_STRING;
+ final StdAttributeValue<String> attValue = new StdAttributeValue<String>(identifier, testVal);
+ final FunctionArgument fArg = new FunctionArgumentAttributeValue(attValue);
+ final List<FunctionArgument> listFa = new ArrayList<FunctionArgument>();
+ listFa.add(fArg);
+ listFa.add(fArg);
+
+ // Try a match
+ final FunctionDefinitionCustomRegexpMatch<String> regexpMatch =
+ new FunctionDefinitionCustomRegexpMatch<String>(testFnId, DataTypes.DT_STRING);
+ final ExpressionResult result = regexpMatch.evaluate(null, listFa);
+ assertEquals(result.getStatus().isOk(), true);
+ }