Github user brosander commented on a diff in the pull request:
https://github.com/apache/nifi/pull/912#discussion_r76330615
--- Diff:
nifi-commons/nifi-processor-utilities/src/test/java/org/apache/nifi/processor/util/TestStandardValidators.java
---
@@ -100,4 +100,105 @@ public void testDataSizeBoundsValidator() {
vr = val.validate("DataSizeBounds", "water", validationContext);
assertFalse(vr.isValid());
}
+
+ @Test
+ public void testListValidator() {
+ Validator val = StandardValidators.createListValidator(true,
false, StandardValidators.NON_EMPTY_VALIDATOR);
--- End diff --
The trimming behavior would probably be easier to test with the
BOOLEAN_VALIDATOR or similar.
Ex:
```
vr = val.validate("List", "notbool", validationContext);
assertFalse(vr.isValid());
vr = val.validate("List", "true", validationContext);
assertTrue(vr.isValid());
vr = val.validate("List", " true \n ", validationContext);
assertTrue(vr.isValid());
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---