From 8349b515da313bff8526717e92152b9fc2c9f429 Mon Sep 17 00:00:00 2001 From: Rupinder Date: Fri, 22 May 2020 17:31:05 +0530 Subject: added assert statements in JUnits Issue-ID: SO-2804 Change-Id: Iddb9630af826b719a6e55a974005e9a520401d8e Signed-off-by: Rupinder --- .../java/org/onap/so/cloudify/exceptions/MsoCloudifyExceptionTest.java | 1 + .../src/test/java/org/onap/so/cloudify/exceptions/MsoCloudifyTest.java | 1 + .../java/org/onap/so/cloudify/exceptions/MsoCloudifyTimeoutTest.java | 1 + .../src/test/java/org/onap/so/openstack/beans/MsoTenantTest.java | 2 ++ .../org/onap/so/openstack/utils/MsoHeatEnvironmentParameterTest.java | 2 ++ 5 files changed, 7 insertions(+) (limited to 'adapters/mso-adapter-utils/src') diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/exceptions/MsoCloudifyExceptionTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/exceptions/MsoCloudifyExceptionTest.java index d45f685795..1506fda817 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/exceptions/MsoCloudifyExceptionTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/exceptions/MsoCloudifyExceptionTest.java @@ -28,6 +28,7 @@ public class MsoCloudifyExceptionTest { MsoCloudifyException mcl = new MsoCloudifyException(200, "message", "detail", e); mce.setPendingWorkflow(pendingWorkflow); assert (mcl.toString() != null); + assertNotNull(mce); } } diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/exceptions/MsoCloudifyTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/exceptions/MsoCloudifyTest.java index 08b2356fdc..25dcae3c2c 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/exceptions/MsoCloudifyTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/exceptions/MsoCloudifyTest.java @@ -24,6 +24,7 @@ public class MsoCloudifyTest { MsoBlueprintAlreadyExists mbae = new MsoBlueprintAlreadyExists("blueprintId", "cloud"); MsoCloudifyManagerNotFound mcm = new MsoCloudifyManagerNotFound("cloudSiteId"); MsoDeploymentAlreadyExists mdae = new MsoDeploymentAlreadyExists("deploymentId", "cloud"); + assertNotNull((mbae)); } } diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/exceptions/MsoCloudifyTimeoutTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/exceptions/MsoCloudifyTimeoutTest.java index 48c5c877a5..dc74d83d04 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/exceptions/MsoCloudifyTimeoutTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/exceptions/MsoCloudifyTimeoutTest.java @@ -27,6 +27,7 @@ public class MsoCloudifyTimeoutTest { MsoCloudifyTimeout mct = new MsoCloudifyTimeout(execution); mct.getExecution(); assert (mct.toString() != null); + assertNotNull(mct); } } diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/MsoTenantTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/MsoTenantTest.java index ece5b21f19..3f2a6263d3 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/MsoTenantTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/MsoTenantTest.java @@ -15,6 +15,7 @@ package org.onap.so.openstack.beans; +import static org.junit.Assert.*; import java.util.HashMap; import java.util.Map; import org.junit.Test; @@ -32,5 +33,6 @@ public class MsoTenantTest { assert (ms.getMetadata().equals(map)); assert (ms.getTenantId().equals("tenantId")); assert (ms.getTenantName().equals("tenantName")); + assertNotNull(map); } } diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatEnvironmentParameterTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatEnvironmentParameterTest.java index 954f237ffe..de39df7b35 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatEnvironmentParameterTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatEnvironmentParameterTest.java @@ -17,6 +17,7 @@ package org.onap.so.openstack.utils; import static org.mockito.Mockito.mock; import org.junit.Test; +import static org.junit.Assert.*; public class MsoHeatEnvironmentParameterTest { @@ -35,6 +36,7 @@ public class MsoHeatEnvironmentParameterTest { // assertTrue(op.equals(hep)); meo.equals(op); meo.hashCode(); + assertNotNull(mea); } } -- cgit 1.2.3-korg