2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6 * Modifications Copyright (C) 2021 Nordix Foundation.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
20 * SPDX-License-Identifier: Apache-2.0
21 * ============LICENSE_END=========================================================
24 package org.onap.policy.models.tosca.authorative.concepts;
26 import com.openpojo.reflection.filters.FilterClassName;
27 import com.openpojo.reflection.filters.FilterPackageInfo;
28 import com.openpojo.validation.Validator;
29 import com.openpojo.validation.ValidatorBuilder;
30 import com.openpojo.validation.rule.impl.GetterMustExistRule;
31 import com.openpojo.validation.rule.impl.SetterMustExistRule;
32 import com.openpojo.validation.test.impl.GetterTester;
33 import com.openpojo.validation.test.impl.SetterTester;
34 import org.junit.Test;
35 import org.onap.policy.common.utils.test.ToStringTester;
38 * Class to perform unit tests of all pojos.
40 * @author Chenfei Gao (cgao@research.att.com)
43 public class PojosTest {
45 private static final String POJO_PACKAGE = "org.onap.policy.models.tosca.authorative.concepts";
48 public void testPojos() {
50 final Validator validator = ValidatorBuilder
52 .with(new ToStringTester())
53 .with(new SetterMustExistRule())
54 .with(new GetterMustExistRule())
55 .with(new SetterTester())
56 .with(new GetterTester())
58 validator.validate(POJO_PACKAGE,
59 new FilterPackageInfo(),
61 org.onap.policy.models.tosca.authorative.concepts.ToscaTypedEntityFilter.class.getName()),
63 org.onap.policy.models.tosca.authorative.concepts.ToscaEntityFilter.class.getName()),
65 ToscaIdentifierTestBase.class.getName())