diff options
author | Rupinder <rupinsi1@in.ibm.com> | 2020-05-18 11:03:59 +0530 |
---|---|---|
committer | Takamune Cho <takamune.cho@att.com> | 2020-05-18 13:09:12 +0000 |
commit | ece150b7f8acc61dd983f6674bf9c8d4f086b84c (patch) | |
tree | da7c8e0eb47d3554b74ddc125ed697bdae658a8a /appc-config | |
parent | 2d2cfcffbc2032be20034f69f34cc72983b1cfe6 (diff) |
added assert statements in 4 jUnits
Issue-ID: APPC-1859
Change-Id: I82620e573e99fab83870da8402947989d3497895
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
Diffstat (limited to 'appc-config')
4 files changed, 9 insertions, 0 deletions
diff --git a/appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java b/appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java index fe7cb1d7b..5046dffb3 100644 --- a/appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java +++ b/appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java @@ -226,6 +226,7 @@ public class TestPropertyDefinitionNode { PropertyDefinition propertyDefinition = transformer.convertYAMLToPD(yamlData); String yaml = transformer.convertPDToYaml(propertyDefinition); + assertNotNull(transformer); } @Test diff --git a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java index ae5518dc9..bd3d73d65 100644 --- a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java +++ b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java @@ -26,6 +26,7 @@ package org.onap.appc.data.services.db; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertNotNull; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; @@ -274,6 +275,7 @@ public class TestDGGeneralDBService { String prefix="test"; String templateModelId = "template001"; dbService.getVnfcReferenceByVnfTypeNActionWithTemplateModelId(ctx, prefix, templateModelId); + assertNotNull(dbService); } @Test @@ -310,6 +312,7 @@ public class TestDGGeneralDBService { String templateModelId = "template001"; String fileCategory="testCategory"; dbService.getTemplateByVnfTypeNActionWithTemplateModelId(ctx, prefix, fileCategory, templateModelId); + assertNotNull(dbService); } @Test diff --git a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestGeneralDataService.java b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestGeneralDataService.java index e79a86dd8..70f19096c 100644 --- a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestGeneralDataService.java +++ b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestGeneralDataService.java @@ -32,6 +32,8 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicResource.QueryStatus; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; @RunWith(PowerMockRunner.class) @PrepareForTest(DGGeneralDBService.class) @@ -58,6 +60,7 @@ public class TestGeneralDataService { PowerMockito.when(dGGeneralDBService.saveConfigTransactionLog(anyObject(), eq(""))) .thenReturn(QueryStatus.SUCCESS); generalDataService.saveTransactionLog(inParams, ctx); + assertNotNull(dGGeneralDBService); } @Test(expected = Exception.class) diff --git a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestSQLSaveQuery.java b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestSQLSaveQuery.java index b482eab0b..9b07d3e8a 100644 --- a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestSQLSaveQuery.java +++ b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestSQLSaveQuery.java @@ -30,6 +30,7 @@ import java.io.IOException; import org.apache.commons.io.FileUtils; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import org.apache.commons.lang.StringEscapeUtils; import org.junit.Test; import org.slf4j.Logger; @@ -55,6 +56,7 @@ public class TestSQLSaveQuery { + " SET request_id = $request-id , message_type = 'request' , message = $log_message ;"; String resolvedContext = resolveCtxVars(key, ctx); ctx.setAttribute("log_message", null); + assertNotNull(message); } catch (IOException e) { } |