Bump gui code coverage 58/103458/4
authorPamela Dragosh <pdragosh@research.att.com>
Tue, 10 Mar 2020 16:37:34 +0000 (12:37 -0400)
committerPamela Dragosh <pdragosh@research.att.com>
Tue, 10 Mar 2020 21:48:06 +0000 (17:48 -0400)
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>
gui-pdp-monitoring/src/test/java/org/onap/policy/gui/pdp/monitoring/rest/EngineStatusTest.java [new file with mode: 0644]
gui-pdp-monitoring/src/test/java/org/onap/policy/gui/pdp/monitoring/rest/StatisticsResponseTest.java [new file with mode: 0644]

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 (file)
index 0000000..46a19dc
--- /dev/null
@@ -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 (file)
index 0000000..d38f08c
--- /dev/null
@@ -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()));
+    }
+}