From 87d89cc09158b28b1ee24f594ee972ee581f6c7c Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Tue, 10 Mar 2020 12:37:34 -0400 Subject: Bump gui code coverage Testing these with openpojos should get code coverage above 55%. Issue-ID: POLICY-2420 Change-Id: I9e7ef6f42f04d5c9f090f9b6cd305950a8180f3c Signed-off-by: Pamela Dragosh --- .../gui/pdp/monitoring/rest/EngineStatusTest.java | 40 ++++++++++++++++++++++ .../monitoring/rest/StatisticsResponseTest.java | 39 +++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 gui-pdp-monitoring/src/test/java/org/onap/policy/gui/pdp/monitoring/rest/EngineStatusTest.java create mode 100644 gui-pdp-monitoring/src/test/java/org/onap/policy/gui/pdp/monitoring/rest/StatisticsResponseTest.java diff --git a/gui-pdp-monitoring/src/test/java/org/onap/policy/gui/pdp/monitoring/rest/EngineStatusTest.java b/gui-pdp-monitoring/src/test/java/org/onap/policy/gui/pdp/monitoring/rest/EngineStatusTest.java new file mode 100644 index 0000000..46a19dc --- /dev/null +++ b/gui-pdp-monitoring/src/test/java/org/onap/policy/gui/pdp/monitoring/rest/EngineStatusTest.java @@ -0,0 +1,40 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2020 AT&T + * ================================================================================ + * 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.gui.pdp.monitoring.rest; + +import com.openpojo.reflection.filters.FilterClassName; +import com.openpojo.validation.Validator; +import com.openpojo.validation.ValidatorBuilder; +import com.openpojo.validation.rule.impl.SetterMustExistRule; +import com.openpojo.validation.test.impl.SetterTester; +import org.junit.Test; + +public class EngineStatusTest { + + @Test + public void testEngineStatus() { + final Validator validator = ValidatorBuilder.create().with(new SetterMustExistRule()) + .with(new SetterTester()).build(); + validator.validate(EngineStatus.class.getPackage().getName(), + new FilterClassName(EngineStatus.class.getName())); + } + +} diff --git a/gui-pdp-monitoring/src/test/java/org/onap/policy/gui/pdp/monitoring/rest/StatisticsResponseTest.java b/gui-pdp-monitoring/src/test/java/org/onap/policy/gui/pdp/monitoring/rest/StatisticsResponseTest.java new file mode 100644 index 0000000..d38f08c --- /dev/null +++ b/gui-pdp-monitoring/src/test/java/org/onap/policy/gui/pdp/monitoring/rest/StatisticsResponseTest.java @@ -0,0 +1,39 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2020 AT&T + * ================================================================================ + * 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.gui.pdp.monitoring.rest; + +import com.openpojo.reflection.filters.FilterClassName; +import com.openpojo.validation.Validator; +import com.openpojo.validation.ValidatorBuilder; +import com.openpojo.validation.rule.impl.SetterMustExistRule; +import com.openpojo.validation.test.impl.SetterTester; +import org.junit.Test; + +public class StatisticsResponseTest { + + @Test + public void testStatisticsResponse() { + final Validator validator = ValidatorBuilder.create().with(new SetterMustExistRule()) + .with(new SetterTester()).build(); + validator.validate(StatisticsResponse.class.getPackage().getName(), + new FilterClassName(StatisticsResponse.class.getName())); + } +} -- cgit 1.2.3-korg