diff options
author | Jim Hahn <jrh3@att.com> | 2019-03-21 09:54:30 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2019-03-22 12:19:37 -0400 |
commit | a4b62b8f4da98eefe530e0fc11f6dafabe0019c2 (patch) | |
tree | 96f6acb9c49b9e4aa0d3c33dc805cf37b264f659 /models-pdp/src/test/java/org | |
parent | 834851e6c460ef8a28f356a64fe7b85d8bbf9a55 (diff) |
Add models-pdp to models repo
Also changed supportedPolicyTypes to PfConceptKey.
Updated licenses.
Removed trailing whitespace from pom.
Provide default request id.
Rebased to fix merge conflict.
Added SupportedPolicyType class.
Renamed SupportedPolicyType to PolicyTypeIdent, and moved it to
models-base. Also updated models-pap to use it.
Deleted models-pdp Policy and replaced it with ToscaPolicy.
Updated test method name.
Change-Id: Id65f769c2f308c6b56e79978bd50b84f2e0b3d02
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-pdp/src/test/java/org')
-rw-r--r-- | models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/TestModels.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/TestModels.java b/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/TestModels.java new file mode 100644 index 000000000..39aee6f48 --- /dev/null +++ b/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/TestModels.java @@ -0,0 +1,46 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019 AT&T Intellectual Property. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.models.pdp.concepts; + +import com.openpojo.reflection.filters.FilterPackageInfo; +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 org.junit.Test; +import org.onap.policy.common.utils.validation.ToStringTester; + +/** + * Class to perform unit testing of models. + * + * @author Ram Krishna Verma (ram.krishna.verma@est.tech) + */ +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()); + } +} |