diff options
author | Rupinder <rupinsi1@in.ibm.com> | 2020-05-15 13:43:51 +0530 |
---|---|---|
committer | Takamune Cho <takamune.cho@att.com> | 2020-05-16 13:25:12 +0000 |
commit | 6e31b176be9421c154ac7d164254d9df31d68d56 (patch) | |
tree | 4cb9cd9f3c943026be46f27189921c3d94f91a5b /appc-adapters | |
parent | db0d945a6f3f0a446ad47f1faa4c5c63da846327 (diff) |
added assert statements in jUnits
Issue-ID: APPC-1859
Change-Id: I80ce69ae34b7560bef1b1be06b8c3bb9fef73e22
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
Diffstat (limited to 'appc-adapters')
4 files changed, 8 insertions, 0 deletions
diff --git a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/test/java/org/onap/appc/adapter/ansible/impl/TestAnsibleAdapterImpl.java b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/test/java/org/onap/appc/adapter/ansible/impl/TestAnsibleAdapterImpl.java index 8e13a66ea..09c0f424c 100644 --- a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/test/java/org/onap/appc/adapter/ansible/impl/TestAnsibleAdapterImpl.java +++ b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/test/java/org/onap/appc/adapter/ansible/impl/TestAnsibleAdapterImpl.java @@ -356,6 +356,7 @@ public class TestAnsibleAdapterImpl { configuration.setProperty("org.onap.appc.adapter.ansible.clientType", "TRUST_CERT"); configuration.setProperty("org.onap.appc.adapter.ansible.trustStore.trustPasswd", "appc"); adapter = new AnsibleAdapterImpl(); + assertNotNull(adapter); } } diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestServiceCatalogV2.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestServiceCatalogV2.java index d7267183b..f374c6d24 100644 --- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestServiceCatalogV2.java +++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestServiceCatalogV2.java @@ -257,6 +257,7 @@ public class TestServiceCatalogV2 { String out = catalog.toString();
System.out.println(out);
+ assertNotNull(catalog);
}
@Test
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestServiceCatalogV3.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestServiceCatalogV3.java index f2ebf02d0..0da114bba 100644 --- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestServiceCatalogV3.java +++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestServiceCatalogV3.java @@ -245,6 +245,7 @@ public class TestServiceCatalogV3 { String pass = "";
catalog = new ServiceCatalogV3(IDENTITY_URL, TENANT_NAME, PRINCIPAL, CREDENTIAL, DOMAIN, properties);
+ assertNotNull(catalog);
}
@Test
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestTenantCache.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestTenantCache.java index 4e9aefb97..32f8d457e 100644 --- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestTenantCache.java +++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestTenantCache.java @@ -118,6 +118,7 @@ public class TestTenantCache { public void testDestroy() { TenantCache spy = Mockito.spy(tenantCache); spy.destroy(context, pool); + assertNotNull(spy); } @Test @@ -125,6 +126,7 @@ public class TestTenantCache { doThrow(new IOException("I/O Exception occured while closing context")).when(context).close(); TenantCache spy = Mockito.spy(tenantCache); spy.destroy(context, pool); + assertNotNull(spy); } @Test @@ -134,6 +136,7 @@ public class TestTenantCache { when(catalog.getProjectId()).thenReturn(TENANT_ID); when(catalog.getProjectName()).thenReturn(TENANT_NAME); spyTenant.initialize(); + assertNotNull(spyTenant); } @Test @@ -145,6 +148,7 @@ public class TestTenantCache { when(spyTenant.getTenantName()).thenReturn(TENANT_NAME); when(catalog.getRegions()).thenReturn(regions); spyTenant.initialize(); + assertNotNull(props); } @Test @@ -155,6 +159,7 @@ public class TestTenantCache { doThrow(new ContextConnectionException("Contex Connection Exception")).when(catalog).init(); TenantCache spyTenant = Mockito.spy(tenantCache); spyTenant.initialize(); + assertNotNull(props); } @Test |