diff options
author | liamfallon <liam.fallon@est.tech> | 2019-04-04 17:27:50 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2019-04-04 17:27:50 +0000 |
commit | 2f925fb69dfc65bf25870fe89c004a009a73e476 (patch) | |
tree | c0df780f50519d8ee2fdb5bb4d3afb00155e446c /models-tosca/src/test/java | |
parent | 325646aaa6c064fefe2a8a33a86db4b1f15f8983 (diff) |
Add filters on policy objects
I just raised this review to shwo where I'm going with the
filters. They are not complete yet.
Issue-ID: POLICY-1095
Change-Id: I7b602a32bb67159b893f3b3cefea5d88038c4e5f
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-tosca/src/test/java')
-rw-r--r-- | models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/TestPojos.java | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/TestPojos.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/TestPojos.java index 7c813a625..96d82e7b3 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/TestPojos.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/TestPojos.java @@ -22,6 +22,7 @@ package org.onap.policy.models.tosca.authorative.concepts; +import com.openpojo.reflection.filters.FilterClassName; import com.openpojo.reflection.filters.FilterPackageInfo; import com.openpojo.validation.Validator; import com.openpojo.validation.ValidatorBuilder; @@ -44,9 +45,22 @@ public class TestPojos { @Test public void testPojos() { - final Validator validator = ValidatorBuilder.create().with(new ToStringTester()) - .with(new SetterMustExistRule()).with(new GetterMustExistRule()).with(new SetterTester()) - .with(new GetterTester()).build(); - validator.validate(POJO_PACKAGE, new FilterPackageInfo()); + // @formatter:off + final Validator validator = ValidatorBuilder + .create() + .with(new ToStringTester()) + .with(new SetterMustExistRule()) + .with(new GetterMustExistRule()) + .with(new SetterTester()) + .with(new GetterTester()) + .build(); + validator.validate(POJO_PACKAGE, + new FilterPackageInfo(), + new FilterClassName( + org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyFilter.class.getName()), + new FilterClassName( + org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeFilter.class.getName()) + ); + // @formatter:on } } |