X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=models-pap%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fmodels%2Fpap%2Fconcepts%2FTestModels.java;h=1658ccbd0fca869bb007b697eb761c117766b7cc;hb=f2b0318f53abf9f2345a5cdca74f3dd635aa9b60;hp=ae41a5c4fcf78d0eb38b4692b0d62f28837c698b;hpb=8ad3f95cdcec48b8315a5febfd4ec07bae7aabba;p=policy%2Fmodels.git diff --git a/models-pap/src/test/java/org/onap/policy/models/pap/concepts/TestModels.java b/models-pap/src/test/java/org/onap/policy/models/pap/concepts/TestModels.java index ae41a5c4f..1658ccbd0 100644 --- a/models-pap/src/test/java/org/onap/policy/models/pap/concepts/TestModels.java +++ b/models-pap/src/test/java/org/onap/policy/models/pap/concepts/TestModels.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. + * Copyright (C) 2019-2021 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,11 +20,13 @@ package org.onap.policy.models.pap.concepts; -import com.openpojo.reflection.filters.FilterPackageInfo; +import com.openpojo.reflection.PojoClass; +import com.openpojo.reflection.impl.PojoClassFactory; import com.openpojo.validation.Validator; import com.openpojo.validation.ValidatorBuilder; import com.openpojo.validation.test.impl.GetterTester; import com.openpojo.validation.test.impl.SetterTester; +import java.util.List; import org.junit.Test; import org.onap.policy.common.utils.test.ToStringTester; @@ -37,8 +39,19 @@ public class TestModels { @Test public void testPapModels() { - final Validator validator = ValidatorBuilder.create().with(new ToStringTester()).with(new SetterTester()) - .with(new GetterTester()).build(); - validator.validate(TestModels.class.getPackage().getName(), new FilterPackageInfo()); + List pojoClasses = PojoClassFactory.getPojoClasses(TestModels.class.getPackage().getName()); + + // @formatter:off + final Validator validator = + ValidatorBuilder.create() + .with(new ToStringTester()) + .with(new SetterTester()) + .with(new GetterTester()) + .build(); + // @formatter:on + + pojoClasses.remove(PojoClassFactory.getPojoClass(PdpDeployPolicies.class)); + + validator.validate(pojoClasses); } }