From e83d137179fa3c532c191f89f9e6cdd53b0778c7 Mon Sep 17 00:00:00 2001 From: xuegao Date: Thu, 25 Mar 2021 16:00:32 +0100 Subject: Improve test coverage Add unit tests to improve test coverage. Issue-ID: SDC-3428 Change-Id: Ifd9e6eb25fa3ec9f4f93d283277574120edff835 Signed-off-by: xuegao --- .../org/openecomp/sdc/health/data/HealthCheckStatusTest.java | 12 +++++++++--- .../org/openecomp/sdc/health/data/MonitoredModulesTest.java | 11 ++++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) (limited to 'openecomp-be/backend/openecomp-sdc-healthcheck-manager/src/test/java') diff --git a/openecomp-be/backend/openecomp-sdc-healthcheck-manager/src/test/java/org/openecomp/sdc/health/data/HealthCheckStatusTest.java b/openecomp-be/backend/openecomp-sdc-healthcheck-manager/src/test/java/org/openecomp/sdc/health/data/HealthCheckStatusTest.java index 98850defd1..091118e0fa 100644 --- a/openecomp-be/backend/openecomp-sdc-healthcheck-manager/src/test/java/org/openecomp/sdc/health/data/HealthCheckStatusTest.java +++ b/openecomp-be/backend/openecomp-sdc-healthcheck-manager/src/test/java/org/openecomp/sdc/health/data/HealthCheckStatusTest.java @@ -19,10 +19,11 @@ */ package org.openecomp.sdc.health.data; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import org.junit.Test; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; public class HealthCheckStatusTest { @@ -37,4 +38,9 @@ public class HealthCheckStatusTest { HealthCheckStatus status = HealthCheckStatus.toValue("MAYBE"); assertNull(status); } + + @Test + public void toStringTest() { + assertEquals("UP", HealthCheckStatus.UP.toString()); + } } \ No newline at end of file diff --git a/openecomp-be/backend/openecomp-sdc-healthcheck-manager/src/test/java/org/openecomp/sdc/health/data/MonitoredModulesTest.java b/openecomp-be/backend/openecomp-sdc-healthcheck-manager/src/test/java/org/openecomp/sdc/health/data/MonitoredModulesTest.java index fe9415a72c..be578d9ac8 100644 --- a/openecomp-be/backend/openecomp-sdc-healthcheck-manager/src/test/java/org/openecomp/sdc/health/data/MonitoredModulesTest.java +++ b/openecomp-be/backend/openecomp-sdc-healthcheck-manager/src/test/java/org/openecomp/sdc/health/data/MonitoredModulesTest.java @@ -19,10 +19,10 @@ */ package org.openecomp.sdc.health.data; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import org.junit.jupiter.api.Test; -import org.junit.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; public class MonitoredModulesTest { @@ -37,4 +37,9 @@ public class MonitoredModulesTest { MonitoredModules modules = MonitoredModules.toValue("UP"); assertNull(modules); } + + @org.junit.jupiter.api.Test + public void toStringTest() { + assertEquals("BE", MonitoredModules.BE.toString()); + } } \ No newline at end of file -- cgit 1.2.3-korg