diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2020-03-10 12:37:34 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2020-03-10 17:48:06 -0400 |
commit | 87d89cc09158b28b1ee24f594ee972ee581f6c7c (patch) | |
tree | 634a7abee4497af68364807a7417a9f30914d76f | |
parent | 7fa12fdd8d4428a8b21ad143943858a1ca2e0e27 (diff) |
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 <pdragosh@research.att.com>
2 files changed, 79 insertions, 0 deletions
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())); + } +} |