From 96119e62a35496ecb0093c0f55300dffb95c8d33 Mon Sep 17 00:00:00 2001 From: Anand Chaturvedi Date: Thu, 24 Aug 2017 00:10:17 -0400 Subject: Added New Junit Cases for APPC Design Services Issue-ID: APPC-168 Change-Id: Ib321bb77af3cb47abfce80d96f50a6b75b34b34e Signed-off-by: Anand Chaturvedi --- .../data/services/db/TestConfigResourceNode.java | 115 +++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 appc-config/appc-data-services/provider/src/test/java/org/openecomp/appc/data/services/db/TestConfigResourceNode.java (limited to 'appc-config/appc-data-services') diff --git a/appc-config/appc-data-services/provider/src/test/java/org/openecomp/appc/data/services/db/TestConfigResourceNode.java b/appc-config/appc-data-services/provider/src/test/java/org/openecomp/appc/data/services/db/TestConfigResourceNode.java new file mode 100644 index 000000000..b134de0b1 --- /dev/null +++ b/appc-config/appc-data-services/provider/src/test/java/org/openecomp/appc/data/services/db/TestConfigResourceNode.java @@ -0,0 +1,115 @@ +package org.openecomp.appc.data.services.db; + +import java.io.InputStream; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import org.junit.Test; +import org.openecomp.appc.data.services.AppcDataServiceConstant; +import org.openecomp.appc.data.services.db.DGGeneralDBService; +import org.openecomp.appc.data.services.node.ConfigResourceNode; +import org.apache.commons.lang.StringEscapeUtils; +import org.junit.After; +import org.junit.Before; +import org.openecomp.sdnc.sli.SvcLogicContext; +import org.openecomp.sdnc.sli.SvcLogicException; +import org.openecomp.sdnc.sli.SvcLogicResource; +import org.openecomp.sdnc.sli.SvcLogicResource.QueryStatus; +import org.openecomp.sdnc.sli.resource.sql.SqlResource; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; + +import java.io.File; + +public class TestConfigResourceNode { + + @Test(expected = Exception.class) + public void testGetUploadConfig1() throws SvcLogicException{ + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("test","test"); + ConfigResourceNode dbService = new ConfigResourceNode() ; + Map map = new HashMap(); + dbService.getConfigFileReference(map,ctx); + //System.out.println(status); + + + } + +@Test(expected = Exception.class) + +public void testGetUploadConfig2() throws SvcLogicException{ +SvcLogicContext ctx = new SvcLogicContext(); +ctx.setAttribute("test","test"); + ConfigResourceNode dbService = new ConfigResourceNode() ; + Map map = new HashMap(); + dbService.getTemplate(map,ctx); + //System.out.println(status); +} + +@Test(expected = Exception.class) + +public void testGetUploadConfig3() throws SvcLogicException{ +SvcLogicContext ctx = new SvcLogicContext(); +ctx.setAttribute("test","test"); + ConfigResourceNode dbService = new ConfigResourceNode() ; + Map map = new HashMap(); + dbService.getVnfcReference(map, ctx); + //System.out.println(status); + + +} + +@Test(expected = Exception.class) + +public void testGetUploadConfig4() throws SvcLogicException{ +SvcLogicContext ctx = new SvcLogicContext(); +ctx.setAttribute("test","test"); + ConfigResourceNode dbService = new ConfigResourceNode() ; + Map map = new HashMap(); + dbService.getSmmChainKeyFiles(map, ctx); + //System.out.println(status); + + +} + +@Test(expected = Exception.class) + +public void testGetUploadConfig5() throws SvcLogicException{ +SvcLogicContext ctx = new SvcLogicContext(); +ctx.setAttribute("test","test"); + ConfigResourceNode dbService = new ConfigResourceNode() ; + Map map = new HashMap(); + dbService.getDownloadConfigTemplateByVnf(map, ctx); + //System.out.println(status); + + +} + +@Test(expected = Exception.class) +public void testGetUploadConfig6() throws SvcLogicException{ +SvcLogicContext ctx = new SvcLogicContext(); +ctx.setAttribute("test","test"); + ConfigResourceNode dbService = new ConfigResourceNode() ; + Map map = new HashMap(); + dbService.getCommonConfigInfo(map, ctx); + //System.out.println(status); + + +} + +@Test(expected = Exception.class) +public void testGetUploadConfig7() throws SvcLogicException{ +SvcLogicContext ctx = new SvcLogicContext(); +ctx.setAttribute("test","test"); + ConfigResourceNode dbService = new ConfigResourceNode() ; + Map map = new HashMap(); + dbService.updateUploadConfig(map, ctx); + //System.out.println(status); + + +} + + +} -- cgit 1.2.3-korg