From a4b62b8f4da98eefe530e0fc11f6dafabe0019c2 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 21 Mar 2019 09:54:30 -0400 Subject: 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 --- .../policy/models/pdp/concepts/TestModels.java | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/TestModels.java (limited to 'models-pdp/src/test/java') 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()); + } +} -- cgit 1.2.3-korg