From: Chaturvedi, Anand (ac204h) Date: Fri, 1 Sep 2017 19:35:26 +0000 (-0400) Subject: Junit Cases for Application Controller. X-Git-Tag: v1.2.0~97 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=50fdfca221554d0433b7608777285ec94b7a1b62;p=appc.git Junit Cases for Application Controller. Issue-ID: APPC-168 Change-Id: Iacfc853bef0b641599c60055ac05b1fd090ee3f8 Signed-off-by: Chaturvedi, Anand (ac204h) --- diff --git a/appc-config/appc-config-adaptor/provider/pom.xml b/appc-config/appc-config-adaptor/provider/pom.xml index 48acd8d92..f21d5516c 100644 --- a/appc-config/appc-config-adaptor/provider/pom.xml +++ b/appc-config/appc-config-adaptor/provider/pom.xml @@ -1,97 +1,182 @@ - + + - - UTF-8 - + 4.0.0 + + org.openecomp.appc + appc-config-adaptor + 1.1.0-SNAPSHOT + - - - junit - junit - 3.8.1 + appc-config-adaptor-provider + bundle + APPC Config Component Adaptor - Provider + http://maven.apache.org + + + UTF-8 + ${project.parent.parent.parent.basedir} + + + + + junit + junit + test + + + org.openecomp.sdnc.core + sli-common + compile + + + org.openecomp.sdnc.core + sli-provider + compile + + + org.powermock + powermock-api-mockito test - org.openecomp.sdnc.core - sli-common - compile - - - org.openecomp.sdnc.core - sli-provider - compile + org.mockito + mockito-core + test - - com.att.eelf - eelf-core - + - - jdom - jdom - 1.1 - + + com.att.eelf + eelf-core + - - xerces - xerces - 2.4.0 - provided - - - com.sun.jersey - jersey-client - 1.17 - provided - - - org.jasypt - jasypt - 1.9.2 - compile - - + + com.jcraft + jsch + 0.1.52 + + + + jdom + jdom + 1.1 + - + + xerces + xerces + 2.4.0 + provided + + + com.sun.jersey + jersey-client + 1.17 + provided + + + org.jasypt + jasypt + 1.9.2 + compile + + - - - org.apache.felix - maven-bundle-plugin - true - - - appc.config.adaptor - org.openecomp.appc.config.adaptor.CCAActivator - org.openecomp.appc.config.adaptor - * - * - - ${project.basedir}/src/main/resources/META-INF - - - + + + + org.apache.felix + maven-bundle-plugin + true + + + appc.config.adaptor + org.openecomp.appc.ccadaptor.CCAActivator + org.openecomp.appc.adaptor + * + * + + ${project.basedir}/src/main/resources/META-INF + + - + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + com.brocade.developer + + + providermodule-plugin + + + [1.2.0.100-SNAPSHOT,) + + + process + + + + + + + + + + + + + diff --git a/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/ConfigComponentAdaptorTest.java b/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/ConfigComponentAdaptorTest.java new file mode 100644 index 000000000..17331eea4 --- /dev/null +++ b/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/ConfigComponentAdaptorTest.java @@ -0,0 +1,251 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.ccadaptor; + +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import org.junit.Assert; +import org.junit.Test; +import org.openecomp.sdnc.sli.SvcLogicContext; +import org.powermock.reflect.Whitebox; + +public class ConfigComponentAdaptorTest { + + + @Test + public void testGetCliRunningConfig(){ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + String Get_config_template = ("get_config_template"); + String key = "GetCliRunningConfig"; + Map parameters = new HashMap(); + parameters.put("Host_ip_address", "test"); + parameters.put("User_name", "test"); + parameters.put("Password", "password"); + parameters.put("Port_number", "22"); + parameters.put("Get_config_template", Get_config_template); + + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test"); + cca.configure(key, parameters, ctx); + } + + @Test + public void testDownloadCliConfig(){ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + String Get_config_template = ("get_config_template"); + String key = "DownloadCliConfig"; + Map parameters = new HashMap(); + parameters.put("Host_ip_address", "test"); + parameters.put("User_name", "test"); + parameters.put("Password", "password"); + parameters.put("Port_number", "22"); + parameters.put("Get_config_template", Get_config_template); + + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test"); + cca.configure(key, parameters, ctx); + } + + @Test + public void testXmlDownload(){ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + String Get_config_template = ("get_config_template"); + String key = "xml-download"; + Map parameters = new HashMap(); + parameters.put("Host_ip_address", "test"); + parameters.put("User_name", "test"); + parameters.put("Password", "password"); + parameters.put("Port_number", "22"); + parameters.put("Get_config_template", Get_config_template); + + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test"); + cca.configure(key, parameters, ctx); + } + + @Test + public void testXmlGetrunningconfig(){ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + String Get_config_template = ("get_config_template"); + String key = "xml-getrunningconfig"; + Map parameters = new HashMap(); + parameters.put("Host_ip_address", "test"); + parameters.put("User_name", "test"); + parameters.put("Password", "password"); + parameters.put("Port_number", "22"); + parameters.put("Get_config_template", Get_config_template); + + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test"); + cca.configure(key, parameters, ctx); + } + + @Test + public void testEscapeSql(){ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + String Get_config_template = ("get_config_template"); + String key = "escapeSql"; + Map parameters = new HashMap(); + parameters.put("Host_ip_address", "test"); + parameters.put("User_name", "test"); + parameters.put("Password", "password"); + parameters.put("Port_number", "22"); + parameters.put("Get_config_template", Get_config_template); + + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test"); + cca.configure(key, parameters, ctx); + } + + @Test + public void testAll(){ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + String Get_config_template = ("test"); + String Download_config_template = ("test"); + String key = "GetCliRunningConfig"; + Map parameters = new HashMap(); + parameters.put("Host_ip_address", "test"); + parameters.put("User_name", "test"); + parameters.put("Password", "password"); + parameters.put("Port_number", "22"); + parameters.put("Protocol", "netconf"); + parameters.put("Contents", "Contents"); + parameters.put("Get_config_template", Get_config_template); + parameters.put("Download_config_template", Download_config_template); + parameters.put("Config_contents", "test"); + + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test"); + cca.configure(key, parameters, ctx); + } + + @Test(expected=Exception.class) + public void testAll1(){ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + String key = "get"; + Map parameters = new HashMap(); + parameters.put("Host_ip_address", "test"); + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test"); + cca.configure(key, parameters, ctx); + } + + @Test(expected=Exception.class) + public void testAll2(){ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + String key = "cli"; + Map parameters = new HashMap(); + parameters.put("Host_ip_address", "test"); + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test"); + cca.configure(key, parameters, ctx); + } + + @Test + public void testGetStringBetweenQuotes() throws Exception{ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + String result =Whitebox.invokeMethod(cca, "getStringBetweenQuotes","\"testvalue\""); + Assert.assertEquals("testvalue", result); + } + + @Test + public void testBuildXmlRequest() throws Exception{ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + Map param = new HashMap(); + Whitebox.invokeMethod(cca, "buildXmlRequest",param,"template"); + } + + @Test + public void testTrimResponse() throws Exception{ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + String result =Whitebox.invokeMethod(cca, "trimResponse","testData"); + Assert.assertEquals("", result); + } + + @Test + public void testBuildNetworkData2() throws Exception{ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + SvcLogicContext ctx = new SvcLogicContext(); + String result =Whitebox.invokeMethod(cca, "buildNetworkData2",ctx,"template","operation"); + Assert.assertEquals("template", result); + } + + //@Test + public void testGetLastFewLinesOfFile() throws Exception{ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + Whitebox.invokeMethod(cca, "readFile","test"); + } + + @Test + public void testConnect() throws Exception{ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + SvcLogicContext ctx = new SvcLogicContext(); + cca.activate("key", ctx); + + } + + @Test(expected=Exception.class) + public void testActivate() throws Exception{ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + SvcLogicContext ctx = new SvcLogicContext(); + String result =Whitebox.invokeMethod(cca, "activate",ctx,true); + Assert.assertEquals("template", result); + } + + @Test(expected=Exception.class) + public void testAudit() throws Exception{ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + SvcLogicContext ctx = new SvcLogicContext(); + String result =Whitebox.invokeMethod(cca, "audit",ctx,"test"); + Assert.assertEquals("template", result); + } + + @Test(expected=Exception.class) + public void testPrepare() throws Exception{ + Properties props = null; + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + SvcLogicContext ctx = new SvcLogicContext(); + String result =Whitebox.invokeMethod(cca, "prepare",ctx,"test","test"); + Assert.assertEquals("template", result); + } +} diff --git a/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/DebugLogTest.java b/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/DebugLogTest.java new file mode 100644 index 000000000..522c00279 --- /dev/null +++ b/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/DebugLogTest.java @@ -0,0 +1,38 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.ccadaptor; + +import org.junit.Assert; +import org.junit.Test; + +public class DebugLogTest { + + @Test + public void TestGetDateTime() { + String DateTime = DebugLog.getDateTime(); + Assert.assertNotNull(DateTime); + } + +} \ No newline at end of file diff --git a/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/EncryptionToolTest.java b/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/EncryptionToolTest.java new file mode 100644 index 000000000..e352098db --- /dev/null +++ b/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/EncryptionToolTest.java @@ -0,0 +1,46 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.ccadaptor; + +import org.junit.Assert; +import org.junit.Test; + +public class EncryptionToolTest { + + @Test + public void testEncrypt() { + EncryptionTool tool = EncryptionTool.getInstance(); + String value = tool.encrypt("encrypt"); + Assert.assertEquals("enc:JjEZHlg7VQ==", value); + } + + @Test + public void testDecrypt() { + EncryptionTool tool = EncryptionTool.getInstance(); + String value = tool.decrypt("enc:JjEZHlg7VQ=="); + Assert.assertEquals("encrypt", value); + } + +} \ No newline at end of file diff --git a/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/SshJcraftWrapperTest.java b/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/SshJcraftWrapperTest.java new file mode 100644 index 000000000..64e338b58 --- /dev/null +++ b/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/SshJcraftWrapperTest.java @@ -0,0 +1,105 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.ccadaptor; + + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.net.URL; + +import org.junit.Assert; +import org.junit.Test; + +public class SshJcraftWrapperTest { + + @Test + public void TestCheckIfReceivedStringMatchesDelimeter(){ + SshJcraftWrapper wrapper = new SshJcraftWrapper(); + wrapper.getTheDate(); + boolean result = wrapper.checkIfReceivedStringMatchesDelimeter("#", "test#", "test#"); + Assert.assertEquals(true, result); + } + + @Test + public void testRemoveWhiteSpaceAndNewLineCharactersAroundString(){ + SshJcraftWrapper wrapper = new SshJcraftWrapper(); + String nameSpace = wrapper.removeWhiteSpaceAndNewLineCharactersAroundString("namespace "); + Assert.assertEquals("namespace", nameSpace); + } + + @Test + public void testStripOffCmdFromRouterResponse(){ + SshJcraftWrapper wrapper = new SshJcraftWrapper(); + String result = wrapper.stripOffCmdFromRouterResponse("test\nsuccess"); + Assert.assertEquals("success\n", result); + } + + //@Test + public void testGetLastFewLinesOfFile() throws FileNotFoundException, IOException{ + SshJcraftWrapper wrapper = new SshJcraftWrapper(); + URL path = SshJcraftWrapperTest.class.getResource("Test"); + File file = new File(path.getFile()); + String value = wrapper.getLastFewLinesOfFile(file,1); + Assert.assertEquals("\nTest data 3", value); + } + + @Test(expected=Exception.class) + public void testSetRouterCommandType() throws IOException{ + SshJcraftWrapper wrapper = new SshJcraftWrapper(); + wrapper.setRouterCommandType("test"); + wrapper.receiveUntil("test", 2, "test"); + } + + @Test + public void testValues() throws IOException{ + SshJcraftWrapper wrapper = new SshJcraftWrapper(); + wrapper.setEquipNameCode("testcode"); + wrapper.setRouterCommandType("testcommand"); + String equipName =wrapper.getEquipNameCode(); + wrapper.getHostName(); + wrapper.getPassWord(); + wrapper.getRouterName(); + wrapper.getUserName(); + wrapper.getTheDate(); + Assert.assertEquals("testcode", equipName); + } + + @Test(expected=Exception.class) + public void testSetRouterCommandType2() throws IOException{ + SshJcraftWrapper wrapper = new SshJcraftWrapper(); + wrapper.appendToRouterFile("test", 2); + StringBuffer buffer = new StringBuffer(); + buffer.append("test"); + wrapper.appendToRouterFile("Test.txt", buffer); + wrapper.receiveUntilBufferFlush(3, 4, "test"); + } + + @Test(expected=Exception.class) + public void testSetRouterCommandType3() throws IOException{ + SshJcraftWrapper wrapper = new SshJcraftWrapper(); + wrapper.checkIfReceivedStringMatchesDelimeter(3, "test"); + } +} diff --git a/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/XmlUtilTest.java b/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/XmlUtilTest.java new file mode 100644 index 000000000..5621a3d7d --- /dev/null +++ b/appc-config/appc-config-adaptor/provider/src/test/java/org/openecomp/appc/ccadaptor/XmlUtilTest.java @@ -0,0 +1,42 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.ccadaptor; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + +public class XmlUtilTest { + + @Test + public void testXml() { + Map varmap = new HashMap(); + varmap.put("network.data", "test"); + String xmlData = XmlUtil.getXml(varmap, "network"); + Assert.assertEquals("test\n", xmlData); + } +} \ No newline at end of file diff --git a/appc-directed-graph/dg-loader/provider/pom.xml b/appc-directed-graph/dg-loader/provider/pom.xml index 873613507..c074ca6d8 100644 --- a/appc-directed-graph/dg-loader/provider/pom.xml +++ b/appc-directed-graph/dg-loader/provider/pom.xml @@ -72,6 +72,18 @@ org.slf4j jcl-over-slf4j + + org.powermock + powermock-api-mockito + 1.6.2 + test + + + org.mockito + mockito-core + test + + diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLActivate.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLActivate.java index b37400ba7..ac3f6392b 100644 --- a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLActivate.java +++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLActivate.java @@ -1,9 +1,11 @@ /*- * ============LICENSE_START======================================================= - * ONAP : APP-C + * ONAP : APPC * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,6 +17,8 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. * ============LICENSE_END========================================================= */ @@ -46,6 +50,10 @@ public class DGXMLActivate { } this.store = SvcLogicStoreFactory.getSvcLogicStore(propfile); } + + protected DGXMLActivate(SvcLogicStore store) { + this.store = store; + } public void activateDg(String activateFilePath) throws Exception { diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoad.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoad.java index b7651bbe5..13e5e293f 100644 --- a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoad.java +++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoad.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,6 +17,8 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. * ============LICENSE_END========================================================= */ @@ -46,6 +50,10 @@ public class DGXMLLoad { this.store = SvcLogicStoreFactory.getSvcLogicStore(propfile); } + protected DGXMLLoad(SvcLogicStore store) throws Exception { + this.store=store; + } + public void loadDGXMLFile(String dgXMLpath) throws SvcLogicException{ if(dgXMLpath != null ){ SvcLogicParser.load(dgXMLpath, this.store); @@ -95,7 +103,6 @@ public class DGXMLLoad { }else{ throw new Exception("Sufficient inputs for DGXMLLoadNActivate are missing "); } - DGXMLLoad dgXMLLoadDB = new DGXMLLoad(propertyPath); dgXMLLoadDB.loadDGXMLDir(xmlPath); } catch (Exception e) { diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoadNActivate.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoadNActivate.java index f5eb2441f..ae7156cc2 100644 --- a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoadNActivate.java +++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoadNActivate.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,6 +17,8 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. * ============LICENSE_END========================================================= */ @@ -47,6 +51,10 @@ public class DGXMLLoadNActivate { this.store = SvcLogicStoreFactory.getSvcLogicStore(propfile); } + protected DGXMLLoadNActivate(SvcLogicStore store) { + this.store=store; + } + public void loadDGXMLFile(String dgXMLpath) throws SvcLogicException{ if(dgXMLpath != null ){ SvcLogicParser.load(dgXMLpath, this.store); @@ -164,5 +172,4 @@ public class DGXMLLoadNActivate { System.exit(1); } } - } diff --git a/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/DGLoaderTest.java b/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/DGLoaderTest.java new file mode 100644 index 000000000..fea884ca7 --- /dev/null +++ b/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/DGLoaderTest.java @@ -0,0 +1,188 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdnc.dg.loader; + +import static org.junit.Assert.*; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; + +import org.apache.commons.io.FileUtils; +import org.eclipse.osgi.framework.internal.core.BundleContextImpl; +import org.eclipse.osgi.framework.internal.core.BundleHost; +import org.junit.Rule; +import org.junit.Test; +import org.mockito.Mockito; +import org.openecomp.sdnc.sli.ConfigurationException; +import org.openecomp.sdnc.sli.SvcLogicException; +import org.openecomp.sdnc.sli.SvcLogicStore; +import org.openecomp.sdnc.sli.SvcLogicStoreFactory; +import org.osgi.framework.BundleContext; +import org.powermock.reflect.Whitebox; +import org.powermock.*; + +public class DGLoaderTest { + + @Test + public void testXMLGenerator() throws Exception { + DGXMLGenerator application = new DGXMLGenerator(); + String jsonPath = null; + String xmlPath = null; + String propertyPath = "somePath"; + // Generate, GenerateLoad, GenerateLoadActivate + String []args = new String[]{"src/test/resources/json","src/test/resources/xml"}; + //logger.info("DGXML Conversion Started with arguments :"+ args[0] +":"+ args[1]); + if(args != null && args.length >= 2){ + jsonPath = args[0]; + xmlPath = args[1]; + } + + application.generateXMLFromJSON(jsonPath, xmlPath, propertyPath); + File dir=new File("src/test/resources/xml"); + String extensions[]=new String[] {"xml","XML"}; + List files = new ArrayList(); + files=(List) FileUtils.listFiles(dir, extensions, true); + assertNotNull(files.get(0)); + assertNotNull(files.get(0).getName()); + } + + @Test + public void testXMLGeneratorMain() throws Exception { + String []args = new String[]{"src/test/resources/json","src/test/resources/xml"}; + DGXMLGenerator.main(args); + File dir=new File("src/test/resources/xml"); + String extensions[]=new String[] {"xml","XML"}; + List files = new ArrayList(); + files=(List) FileUtils.listFiles(dir, extensions, true); + assertNotNull(files.get(0)); + assertNotNull(files.get(0).getName()); + } + + @Test + public void testDGLoader() throws Exception { + String propertyPath = "src/test/resources/dummy.properties"; + String xmlPath = "src/test/resources/xml/Appc_UniTest.xml"; + DGXMLLoad dgXMLLoad = new MockDGXMLLoad(); + dgXMLLoad.loadDGXMLFile(xmlPath); + } + + @Test + public void testDGLoaderWithDir() throws Exception { + String propertyPath = "src/test/resources/dummy.properties"; + String xmlPath = "src/test/resources/xml"; + DGXMLLoad dgXMLLoad = new MockDGXMLLoad(); + Whitebox.invokeMethod(dgXMLLoad, "loadDGXMLDir",xmlPath); + } + + @Test + public void testDGLoaderWithDirThrowsException() throws Exception { + String propertyPath = "src/test/resources/dummy.properties"; + String xmlPath = "src/test/resources/xml/xml"; + DGXMLLoad dgXMLLoad = new MockDGXMLLoad(); + Whitebox.invokeMethod(dgXMLLoad, "loadDGXMLDir",xmlPath); + } + + @Test + public void testDGActivate() throws Exception { + String propertyPath = "src/test/resources/dummy.properties"; + String activateFilePath = "src/test/resources/dg_activate_test"; + DGXMLActivate dgXMLActivate = new MockDGXMLActivate(); + dgXMLActivate.activateDg(activateFilePath); + + } + + @Test + public void testDGActivateThrowsException() throws Exception { + String propertyPath = "src/test/resources/dummy.properties"; + String activateFilePath = "src/test/resources/someFile"; + DGXMLActivate dgXMLActivate = new MockDGXMLActivate(); + dgXMLActivate.activateDg(activateFilePath); + + } + + @Test + public void testDGLoadNActivate() throws Exception { + String propertyPath = "src/test/resources/dummy.properties"; + String activateFilePath = "src/test/resources/dg_activate_test"; + String xmlPath = "src/test/resources/xml/Appc_UniTest.xml"; + DGXMLLoadNActivate dgXMLLoadNActivate = new MockDGXMLLoadNActivate(); + dgXMLLoadNActivate.loadDGXMLFile(xmlPath); + dgXMLLoadNActivate.activateDg(activateFilePath); + } + + @Test + public void testDGLoadNActivateThrowsException() throws Exception { + String propertyPath = "src/test/resources/dummy.properties"; + String activateFilePath = "src/test/resources/someFile"; + String xmlPath = "src/test/resources/xml/Appc_UniTest.xml"; + DGXMLLoadNActivate dgXMLLoadNActivate = new MockDGXMLLoadNActivate(); + dgXMLLoadNActivate.loadDGXMLFile(xmlPath); + dgXMLLoadNActivate.activateDg(activateFilePath); + } + + @Test + public void testDGLoadNActivateloadDGXMLDir() throws Exception { + String xmlPath = "src/test/resources/xml"; + DGXMLLoadNActivate dgXMLLoadNActivate = new MockDGXMLLoadNActivate(); + Whitebox.invokeMethod(dgXMLLoadNActivate,"loadDGXMLDir",xmlPath); + } + + + public void testDGLoadNActivateloadDGXMLDirThrowsException() throws Exception { + String xmlPath = "src/test/resources/someDir"; + DGXMLLoadNActivate dgXMLLoadNActivate = new MockDGXMLLoadNActivate(); + Whitebox.invokeMethod(dgXMLLoadNActivate,"loadDGXMLDir",xmlPath); + } + + @Test + public void testDGLoaderActivator() throws Exception { + String xmlPath = "src/test/resources/xml"; + DGLoaderActivator dgLoaderActivator = new DGLoaderActivator(); + dgLoaderActivator.start(null); + dgLoaderActivator.stop(null); + assertTrue(true); + } + + @Test (expected=Exception.class) + public void testDGActivateConstructorThrowsException() throws Exception { + String somePath=""; + DGXMLActivate dgXMLActivate = new DGXMLActivate(somePath); + } + + @Test (expected=Exception.class) + public void testDGXMLLoadConstructorThrowsException() throws Exception { + String somePath=""; + DGXMLLoad dgXMLLoad = new DGXMLLoad(somePath); + } + + @Test (expected=Exception.class) + public void testDGLoadNActivateConstructorThrowsException() throws Exception { + String somePath=""; + DGXMLLoadNActivate dgXMLLoadNActivate = new DGXMLLoadNActivate(somePath); + } + +} diff --git a/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockDGXMLActivate.java b/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockDGXMLActivate.java new file mode 100644 index 000000000..5143120cc --- /dev/null +++ b/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockDGXMLActivate.java @@ -0,0 +1,35 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdnc.dg.loader; + +import org.openecomp.sdnc.sli.SvcLogicStore; + +public class MockDGXMLActivate extends DGXMLActivate { + private final static SvcLogicStore storeChild=MockSvcLogicFactory.getMockSvcLogicStore();; + MockDGXMLActivate() throws Exception { + super(storeChild); + } + +} diff --git a/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockDGXMLLoad.java b/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockDGXMLLoad.java new file mode 100644 index 000000000..56cabbf14 --- /dev/null +++ b/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockDGXMLLoad.java @@ -0,0 +1,37 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdnc.dg.loader; + +import org.mockito.internal.util.reflection.Whitebox; +import org.openecomp.sdnc.sli.SvcLogicStore; + +public class MockDGXMLLoad extends DGXMLLoad{ + + private final static SvcLogicStore storeChild=MockSvcLogicFactory.getMockSvcLogicStore();; + MockDGXMLLoad() throws Exception { + super(storeChild); + } + +} diff --git a/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockDGXMLLoadNActivate.java b/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockDGXMLLoadNActivate.java new file mode 100644 index 000000000..266f1cdd6 --- /dev/null +++ b/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockDGXMLLoadNActivate.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdnc.dg.loader; + +import org.openecomp.sdnc.sli.SvcLogicStore; + +public class MockDGXMLLoadNActivate extends DGXMLLoadNActivate { + private final static SvcLogicStore storeChild=MockSvcLogicFactory.getMockSvcLogicStore();; + MockDGXMLLoadNActivate() throws Exception { + super(storeChild); + } +} diff --git a/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockSvcLogicDblibStore.java b/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockSvcLogicDblibStore.java new file mode 100644 index 000000000..ab96ef7f2 --- /dev/null +++ b/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockSvcLogicDblibStore.java @@ -0,0 +1,86 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdnc.dg.loader; + +import java.util.Properties; + +import org.openecomp.sdnc.sli.SvcLogicDblibStore; +import org.openecomp.sdnc.sli.SvcLogicException; +import org.openecomp.sdnc.sli.SvcLogicGraph; +import org.openecomp.sdnc.sli.SvcLogicStore; + +public class MockSvcLogicDblibStore implements SvcLogicStore { + + @Override + public boolean hasGraph(String module, String rpc, String version, + String mode) { + return true; + } + @Override + public SvcLogicGraph fetch(String module, String rpc, String version, + String mode) throws SvcLogicException { + SvcLogicGraph retVal=new SvcLogicGraph(); + retVal.setMode("sync"); + retVal.setModule("Appc"); + retVal.setRpc("unitTestDG"); + retVal.setVersion("4.0.0"); + return retVal; + + } + @Override + public void store(SvcLogicGraph graph) throws SvcLogicException { + + } + @Override + public void init(Properties props) throws SvcLogicException { + // TODO Auto-generated method stub + + } + @Override + public void registerNodeType(String nodeType) throws SvcLogicException { + // TODO Auto-generated method stub + + } + @Override + public void unregisterNodeType(String nodeType) throws SvcLogicException { + // TODO Auto-generated method stub + + } + @Override + public boolean isValidNodeType(String nodeType) throws SvcLogicException { + // TODO Auto-generated method stub + return true; + } + @Override + public void delete(String module, String rpc, String version, String mode) throws SvcLogicException { + // TODO Auto-generated method stub + + } + @Override + public void activate(SvcLogicGraph graph) throws SvcLogicException { + // TODO Auto-generated method stub + + } +} diff --git a/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockSvcLogicFactory.java b/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockSvcLogicFactory.java new file mode 100644 index 000000000..e38c64e41 --- /dev/null +++ b/appc-directed-graph/dg-loader/provider/src/test/java/org/openecomp/sdnc/dg/loader/MockSvcLogicFactory.java @@ -0,0 +1,36 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdnc.dg.loader; + +import org.openecomp.sdnc.sli.SvcLogicStore; +import org.openecomp.sdnc.sli.SvcLogicStoreFactory; +import org.openecomp.sdnc.sli.SvcLogicDblibStore; + +public class MockSvcLogicFactory extends SvcLogicStoreFactory { + static SvcLogicStore getMockSvcLogicStore() { + SvcLogicStore store=new MockSvcLogicDblibStore(); + return store; + } +} diff --git a/appc-directed-graph/dg-loader/provider/src/test/resources/dg_activate_test b/appc-directed-graph/dg-loader/provider/src/test/resources/dg_activate_test new file mode 100644 index 000000000..895e177d5 --- /dev/null +++ b/appc-directed-graph/dg-loader/provider/src/test/resources/dg_activate_test @@ -0,0 +1,3 @@ +# MODULE NAME:RPC NAME:VERSION:MODE +# Example -> APPC:GetDeviceRunningConfiguration:3.0.0:sync +Appc:UniTest:4.0.0:sync \ No newline at end of file diff --git a/appc-directed-graph/dg-loader/provider/src/test/resources/dummy.properties b/appc-directed-graph/dg-loader/provider/src/test/resources/dummy.properties new file mode 100644 index 000000000..4545f89af --- /dev/null +++ b/appc-directed-graph/dg-loader/provider/src/test/resources/dummy.properties @@ -0,0 +1,38 @@ +### +# ============LICENSE_START======================================================= +# ONAP : APPC +# ================================================================================ +# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Copyright (C) 2017 Amdocs +# ============================================================================= +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# ============LICENSE_END========================================================= +### + +org.openecomp.sdnc.sli.dbtype=jdbc + +org.openecomp.sdnc.sli.jdbc.hosts= +org.openecomp.sdnc.sli.jdbc.url= +org.openecomp.sdnc.sli.jdbc.database= +org.openecomp.sdnc.sli.jdbc.user= +org.openecomp.sdnc.sli.jdbc.password= +org.openecomp.sdnc.sli.jdbc.connection.name= + +org.openecomp.sdnc.sli.jdbc.connection.timeout=50 +org.openecomp.sdnc.sli.jdbc.request.timeout=100 +org.openecomp.sdnc.sli.jdbc.limit.init=10 +org.openecomp.sdnc.sli.jdbc.limit.min=10 +org.openecomp.sdnc.sli.jdbc.limit.max=20 diff --git a/appc-directed-graph/dg-loader/provider/src/test/resources/json/Appc_UniTest.json b/appc-directed-graph/dg-loader/provider/src/test/resources/json/Appc_UniTest.json new file mode 100644 index 000000000..2a6e49b1b --- /dev/null +++ b/appc-directed-graph/dg-loader/provider/src/test/resources/json/Appc_UniTest.json @@ -0,0 +1 @@ +[{"id":"1606180e.6254c","type":"dgstart","name":"DGSTART","outputs":1,"x":494.75,"y":149.75,"z":"7174441c.9fb7f4","wires":[["f650067e.2ad7e"]]},{"id":"f650067e.2ad7e","type":"service-logic","name":"Appc 4.0.0","module":"Appc","version":"4.0.0","comments":"","xml":"","outputs":1,"x":642.75,"y":151.75,"z":"7174441c.9fb7f4","wires":[["10b2117c.ee118f"]]},{"id":"e928ee64.3762c","type":"block","name":"block","xml":"\n","atomic":"false","comments":"","outputs":1,"x":952.75,"y":145.75,"z":"7174441c.9fb7f4","wires":[["342ce050.4a2fe8"]]},{"id":"342ce050.4a2fe8","type":"returnSuccess","name":"return success","xml":"\n\n","comments":"","x":1115.75,"y":146.75,"z":"7174441c.9fb7f4","wires":[]},{"id":"10b2117c.ee118f","type":"method","name":"unitTest","xml":"\n","comments":"","outputs":1,"x":815.75,"y":147.75,"z":"7174441c.9fb7f4","wires":[["e928ee64.3762c"]]}] diff --git a/appc-directed-graph/dg-loader/provider/src/test/resources/xml/Appc_UniTest.xml b/appc-directed-graph/dg-loader/provider/src/test/resources/xml/Appc_UniTest.xml new file mode 100644 index 000000000..6eca1043d --- /dev/null +++ b/appc-directed-graph/dg-loader/provider/src/test/resources/xml/Appc_UniTest.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file