From caa5768a32a385bf7997029929f29fe3b156348e Mon Sep 17 00:00:00 2001 From: Skip Wonnell Date: Sat, 23 Dec 2017 00:18:18 -0600 Subject: Platform Hardening for DG - Part 8 Issue-ID: APPC-305 Change-Id: I70fa76837b02314bdd3211190306cfbd3564d639 Signed-off-by: Skip Wonnell --- .../org/onap/appc/dg/TestCheckConfigStatus.java | 260 ++++++------- .../java/org/onap/appc/dg/TestCommonConfig.java | 367 +++++++++--------- .../appc/dg/TestConfigurationDocumentRequest.java | 50 +-- .../test/java/org/onap/appc/dg/TestConfigure.java | 368 +++++++++--------- .../org/onap/appc/dg/TestDownloadCliConfig.java | 190 +++++----- .../org/onap/appc/dg/TestDownloadIsbcConfig.java | 168 +++++---- .../java/org/onap/appc/dg/TestGenerateConfig.java | 110 +++--- .../onap/appc/dg/TestGenerateTemplateConfig.java | 98 ++--- .../test/java/org/onap/appc/dg/TestGetAaiInfo.java | 206 +++++----- .../java/org/onap/appc/dg/TestGetConfigParams.java | 332 ++++++++-------- .../onap/appc/dg/TestGetDeviceRunningConfig.java | 134 +++---- .../java/org/onap/appc/dg/TestGetVfModuleInfo.java | 90 ++--- .../appc/dg/TestProcessParameterDefinition.java | 420 +++++++++++---------- .../org/onap/appc/dg/TestPublishConfiguration.java | 8 +- .../org/onap/appc/dg/TestSaveRunningConfig.java | 124 +++--- .../test/java/org/onap/appc/dg/TestSetStatus.java | 124 +++--- .../java/org/onap/appc/dg/TestUpdateAaiInfo.java | 150 ++++---- .../appc/dg/mock/instance/MockAaiResource.java | 8 +- .../mock/instance/MockConfigureNodeExecutor.java | 8 +- .../dg/mock/instance/MockSvcLogicJavaPlugin.java | 8 +- 20 files changed, 1651 insertions(+), 1572 deletions(-) (limited to 'appc-directed-graph/appc-dgraph/provider/src/test/java/org') diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestCheckConfigStatus.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestCheckConfigStatus.java index a64d0eb36..994fbc7b2 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestCheckConfigStatus.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestCheckConfigStatus.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========================================================= */ @@ -38,180 +42,180 @@ import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; public class TestCheckConfigStatus /* extends AbstractDGTestCase */ { - private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestCheckConfigStatus.class); - public static String CheckConfigStatusXML = "src/main/resources/xml/APPC_CheckConfigStatus.xml"; + private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestCheckConfigStatus.class); + public static String CheckConfigStatusXML = "src/main/resources/xml/APPC_CheckConfigStatus.xml"; /* - @Test - public void testCheckConfigStatusSuccess() { - try { + @Test + public void testCheckConfigStatusSuccess() { + try { + + String propertyfileName = "APPC/CheckConfigStatus/CheckConfigStatus_Success.properties"; + + // Register Call graphs + String injectGraphXmls[] = new String[] { CheckConfigStatusXML }; + + Map serviceReferences = new HashMap(); + + GraphKey graphKey = new GraphKey("APPC", null, "CheckConfigStatus", null); + DGTestCase tc = new DGTestCase(graphKey); + + + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + + + + } catch (Exception e) { + e.printStackTrace(); + } + } + + + @Test + public void testCheckConfigStatusFailure() { + try { + + String propertyfileName = "APPC/CheckConfigStatus/CheckConfigStatus_Failure.properties"; + + // Register Call graphs + String injectGraphXmls[] = new String[] { CheckConfigStatusXML }; + + Map serviceReferences = new HashMap(); + + + GraphKey graphKey = new GraphKey("APPC", null, "CheckConfigStatus", null); + DGTestCase tc = new DGTestCase(graphKey); + + + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + + + + } catch (Exception e) { + e.printStackTrace(); + } + } + - String propertyfileName = "APPC/CheckConfigStatus/CheckConfigStatus_Success.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { CheckConfigStatusXML }; - Map serviceReferences = new HashMap(); - - GraphKey graphKey = new GraphKey("APPC", null, "CheckConfigStatus", null); - DGTestCase tc = new DGTestCase(graphKey); - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + @Test + public void testParseErrorLogFail() { + try { + String propertyfileName = "APPC/CheckConfigStatus/ParseErrorLogFail.properties"; - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + // Register Call graphs + String injectGraphXmls[] = new String[] { CheckConfigStatusXML }; - + Map serviceReferences = new HashMap(); + serviceReferences.put("org.onap.appc.ccadaptor.ConfigComponentAdaptor", new MockConfigureNodeExecutor()); + GraphKey graphKey = new GraphKey("APPC", null, "CheckConfigStatus", null); + DGTestCase tc = new DGTestCase(graphKey); - } catch (Exception e) { - e.printStackTrace(); - } - } + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - @Test - public void testCheckConfigStatusFailure() { - try { - String propertyfileName = "APPC/CheckConfigStatus/CheckConfigStatus_Failure.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { CheckConfigStatusXML }; - Map serviceReferences = new HashMap(); - - - GraphKey graphKey = new GraphKey("APPC", null, "CheckConfigStatus", null); - DGTestCase tc = new DGTestCase(graphKey); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + //System.out.println("error-message "+ ctx.getAttribute("error-message")); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + } catch (Exception e) { + e.printStackTrace(); + } + } - + @Test + public void testParseErrorLogSuccess() { + try { + String propertyfileName = "APPC/CheckConfigStatus/ParseErrorLogSuccess.properties"; - } catch (Exception e) { - e.printStackTrace(); - } - } + // Register Call graphs + String injectGraphXmls[] = new String[] { CheckConfigStatusXML }; - - + Map serviceReferences = new HashMap(); + serviceReferences.put("org.onap.appc.ccadaptor.ConfigComponentAdaptor", new MockConfigureNodeExecutor()); - @Test - public void testParseErrorLogFail() { - try { + GraphKey graphKey = new GraphKey("APPC", null, "CheckConfigStatus", null); + DGTestCase tc = new DGTestCase(graphKey); - String propertyfileName = "APPC/CheckConfigStatus/ParseErrorLogFail.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { CheckConfigStatusXML }; - Map serviceReferences = new HashMap(); - serviceReferences.put("org.onap.appc.ccadaptor.ConfigComponentAdaptor", new MockConfigureNodeExecutor()); - - GraphKey graphKey = new GraphKey("APPC", null, "CheckConfigStatus", null); - DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - //System.out.println("error-message "+ ctx.getAttribute("error-message")); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - public void testParseErrorLogSuccess() { - try { - String propertyfileName = "APPC/CheckConfigStatus/ParseErrorLogSuccess.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { CheckConfigStatusXML }; + } catch (Exception e) { + e.printStackTrace(); + } + } - Map serviceReferences = new HashMap(); - serviceReferences.put("org.onap.appc.ccadaptor.ConfigComponentAdaptor", new MockConfigureNodeExecutor()); - - GraphKey graphKey = new GraphKey("APPC", null, "CheckConfigStatus", null); - DGTestCase tc = new DGTestCase(graphKey); - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + @Test + public void testMaxRetries() { + try { + String propertyfileName = "APPC/CheckConfigStatus/MaxRetries.properties"; - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + // Register Call graphs + String injectGraphXmls[] = new String[] { CheckConfigStatusXML }; - + Map serviceReferences = new HashMap(); + serviceReferences.put("org.onap.appc.ccadaptor.ConfigComponentAdaptor", new MockConfigureNodeExecutor()); + GraphKey graphKey = new GraphKey("APPC", null, "CheckConfigStatus", null); + DGTestCase tc = new DGTestCase(graphKey); - } catch (Exception e) { - e.printStackTrace(); - } - } - - - @Test - public void testMaxRetries() { - try { - String propertyfileName = "APPC/CheckConfigStatus/MaxRetries.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { CheckConfigStatusXML }; + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - Map serviceReferences = new HashMap(); - serviceReferences.put("org.onap.appc.ccadaptor.ConfigComponentAdaptor", new MockConfigureNodeExecutor()); - - GraphKey graphKey = new GraphKey("APPC", null, "CheckConfigStatus", null); - DGTestCase tc = new DGTestCase(graphKey); - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } - } + } catch (Exception e) { + e.printStackTrace(); + } + } */ } diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestCommonConfig.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestCommonConfig.java index f7ee5abaa..3c939cbe3 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestCommonConfig.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestCommonConfig.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========================================================= */ @@ -39,188 +43,187 @@ public class TestCommonConfig /* extends AbstractDGTestCase */ { /* - public String jsonPath = "src/main/resources/json"; - public String xmlpath = "src/main/resources/xml"; - - @Test - public void testCommonConfig() { - try { - //DGXMLGenerator generator = new DGXMLGenerator(); - //generator.generateXMLFromJSON(jsonPath, xmlpath, null); + public String jsonPath = "src/main/resources/json"; + public String xmlpath = "src/main/resources/xml"; + + @Test + public void testCommonConfig() { + try { + //DGXMLGenerator generator = new DGXMLGenerator(); + //generator.generateXMLFromJSON(jsonPath, xmlpath, null); + + String propertyfileName = "APPC/CommonConfiguration/APPC_method_CommonConfiguration_TC2.properties"; + + String commonConfigureXML = "src/main/resources/xml/APPC_CommonConfiguration.xml"; + String callGraph1XML = "src/main/resources/xml/APPC_GetConfigParams.xml"; + String callGraph2XML = "src/main/resources/xml/APPC_Configure.xml"; + String callGraph3XML = "src/main/resources/xml/APPC_SetStatus.xml"; + String callGraph4XML = "src/main/resources/xml/APPC_DownloadRestconfConfig.xml"; + String callGraph5XML = "src/main/resources/xml/APPC_GenerateConfig.xml"; + String callGraph6XML = "src/main/resources/xml/APPC_DownloadXmlConfig.xml"; + + // Register Call graphs + String injectGraphXmls[] = new String[] { commonConfigureXML, + callGraph1XML, + callGraph2XML, + callGraph3XML, + callGraph4XML, + callGraph5XML, + callGraph6XML }; + + + Map serviceReferences = new HashMap(); + serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode",new org.onap.sdnc.config.generator.convert.ConvertNode()); + serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode()); + serviceReferences.put("org.onap.appc.ccadaptor.ConfigComponentAdaptor", new MockConfigureNodeExecutor()); + + GraphKey graphKey = new GraphKey("APPC", null, "CommonConfiguration", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + + } catch (Exception e) { + e.printStackTrace(); + } + + } + + + + + @Test + public void testGetConfigParamsFailure() { + try { + //DGXMLGenerator generator = new DGXMLGenerator(); + //generator.generateXMLFromJSON(jsonPath, xmlpath, null); + + String propertyfileName = "APPC/CommonConfiguration/GetConfigParamsFail.properties"; + + String commonConfigureXML = "src/main/resources/xml/APPC_CommonConfiguration.xml"; + + + // Register Call graphs + String injectGraphXmls[] = new String[] { commonConfigureXML }; + + Map serviceReferences = new HashMap(); + + + + GraphKey graphKey = new GraphKey("APPC", null, "CommonConfiguration", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + + } catch (Exception e) { + e.printStackTrace(); + } + + } + + + @Test + public void testInvalidRequestAction() { + try { + //DGXMLGenerator generator = new DGXMLGenerator(); + //generator.generateXMLFromJSON(jsonPath, xmlpath, null); + + String propertyfileName = "APPC/CommonConfiguration/InvalidRequestAction.properties"; + + String commonConfigureXML = "src/main/resources/xml/APPC_CommonConfiguration.xml"; + + + // Register Call graphs + String injectGraphXmls[] = new String[] { commonConfigureXML }; + + Map serviceReferences = new HashMap(); + + + + GraphKey graphKey = new GraphKey("APPC", null, "CommonConfiguration", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + + } catch (Exception e) { + e.printStackTrace(); + } + + } + + @Test + public void testCommonConfigISBCTemplateSuccess() { + try { + //DGXMLGenerator generator = new DGXMLGenerator(); + //generator.generateXMLFromJSON(jsonPath, xmlpath, null); + + String propertyfileName = "APPC/CommonConfiguration/ISBCTemplateSuccess.properties"; + + String commonConfigureXML = "src/main/resources/xml/APPC_CommonConfiguration.xml"; + String callGraph1XML = "src/main/resources/xml/APPC_GetConfigParams.xml"; + String callGraph2XML = "src/main/resources/xml/APPC_Configure.xml"; + String callGraph3XML = "src/main/resources/xml/APPC_SetStatus.xml"; + String callGraph4XML = "src/main/resources/xml/APPC_GenerateTemplateConfig.xml"; + String callGraph5XML = "src/main/resources/xml/APPC_CheckConfigStatus.xml"; + String callGraph6XML = "src/main/resources/xml/APPC_DownloadIsbcConfig.xml"; + String callGraph7XML = "src/main/resources/xml/APPC_UpdateAaiInfo.xml"; + String callGraph8XML = "src/main/resources/xml/APPC_GetVfModuleInfo.xml"; + String callGraph9XML = "src/main/resources/xml/APPC_SaveRunningConfig.xml"; + String callGraph10XML = "src/main/resources/xml/APPC_GetDeviceRunningConfig.xml"; + + // Register Call graphs + String injectGraphXmls[] = new String[] { commonConfigureXML, + callGraph1XML, + callGraph2XML, + callGraph3XML, + callGraph4XML, + callGraph5XML, + callGraph6XML, + callGraph7XML, + callGraph8XML, + callGraph9XML, + callGraph10XML }; + + Map serviceReferences = new HashMap(); + serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode",new org.onap.sdnc.config.generator.convert.ConvertNode()); + serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode()); + + + + GraphKey graphKey = new GraphKey("APPC", null, "CommonConfiguration", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + Map resourceReferences = new HashMap(); + tc.setResourceReferences(resourceReferences); + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + - String propertyfileName = "APPC/CommonConfiguration/APPC_method_CommonConfiguration_TC2.properties"; - - String commonConfigureXML = "src/main/resources/xml/APPC_CommonConfiguration.xml"; - String callGraph1XML = "src/main/resources/xml/APPC_GetConfigParams.xml"; - String callGraph2XML = "src/main/resources/xml/APPC_Configure.xml"; - String callGraph3XML = "src/main/resources/xml/APPC_SetStatus.xml"; - String callGraph4XML = "src/main/resources/xml/APPC_DownloadRestconfConfig.xml"; - String callGraph5XML = "src/main/resources/xml/APPC_GenerateConfig.xml"; - String callGraph6XML = "src/main/resources/xml/APPC_DownloadXmlConfig.xml"; + } catch (Exception e) { + e.printStackTrace(); + } - // Register Call graphs - String injectGraphXmls[] = new String[] { commonConfigureXML, - callGraph1XML, - callGraph2XML, - callGraph3XML, - callGraph4XML, - callGraph5XML, - callGraph6XML }; - - - Map serviceReferences = new HashMap(); - serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode",new org.onap.sdnc.config.generator.convert.ConvertNode()); - serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode()); - //serviceReferences.put("com.att.appc.config.generator.node.ConfigResourceNode", new MockConfigResourceNode()); - serviceReferences.put("org.onap.appc.ccadaptor.ConfigComponentAdaptor", new MockConfigureNodeExecutor()); - - GraphKey graphKey = new GraphKey("APPC", null, "CommonConfiguration", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - - } catch (Exception e) { - e.printStackTrace(); - } - - } - - - - - @Test - public void testGetConfigParamsFailure() { - try { - //DGXMLGenerator generator = new DGXMLGenerator(); - //generator.generateXMLFromJSON(jsonPath, xmlpath, null); - - String propertyfileName = "APPC/CommonConfiguration/GetConfigParamsFail.properties"; - - String commonConfigureXML = "src/main/resources/xml/APPC_CommonConfiguration.xml"; - - - // Register Call graphs - String injectGraphXmls[] = new String[] { commonConfigureXML }; - - Map serviceReferences = new HashMap(); - - - - GraphKey graphKey = new GraphKey("APPC", null, "CommonConfiguration", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - - } catch (Exception e) { - e.printStackTrace(); - } - - } - - - @Test - public void testInvalidRequestAction() { - try { - //DGXMLGenerator generator = new DGXMLGenerator(); - //generator.generateXMLFromJSON(jsonPath, xmlpath, null); - - String propertyfileName = "APPC/CommonConfiguration/InvalidRequestAction.properties"; - - String commonConfigureXML = "src/main/resources/xml/APPC_CommonConfiguration.xml"; - - - // Register Call graphs - String injectGraphXmls[] = new String[] { commonConfigureXML }; - - Map serviceReferences = new HashMap(); - - - - GraphKey graphKey = new GraphKey("APPC", null, "CommonConfiguration", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - - } catch (Exception e) { - e.printStackTrace(); - } - - } - - @Test - public void testCommonConfigISBCTemplateSuccess() { - try { - //DGXMLGenerator generator = new DGXMLGenerator(); - //generator.generateXMLFromJSON(jsonPath, xmlpath, null); - - String propertyfileName = "APPC/CommonConfiguration/ISBCTemplateSuccess.properties"; - - String commonConfigureXML = "src/main/resources/xml/APPC_CommonConfiguration.xml"; - String callGraph1XML = "src/main/resources/xml/APPC_GetConfigParams.xml"; - String callGraph2XML = "src/main/resources/xml/APPC_Configure.xml"; - String callGraph3XML = "src/main/resources/xml/APPC_SetStatus.xml"; - String callGraph4XML = "src/main/resources/xml/APPC_GenerateTemplateConfig.xml"; - String callGraph5XML = "src/main/resources/xml/APPC_CheckConfigStatus.xml"; - String callGraph6XML = "src/main/resources/xml/APPC_DownloadIsbcConfig.xml"; - String callGraph7XML = "src/main/resources/xml/APPC_UpdateAaiInfo.xml"; - String callGraph8XML = "src/main/resources/xml/APPC_GetVfModuleInfo.xml"; - String callGraph9XML = "src/main/resources/xml/APPC_SaveRunningConfig.xml"; - String callGraph10XML = "src/main/resources/xml/APPC_GetDeviceRunningConfig.xml"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { commonConfigureXML, - callGraph1XML, - callGraph2XML, - callGraph3XML, - callGraph4XML, - callGraph5XML, - callGraph6XML, - callGraph7XML, - callGraph8XML, - callGraph9XML, - callGraph10XML }; - - Map serviceReferences = new HashMap(); - serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode",new org.onap.sdnc.config.generator.convert.ConvertNode()); - serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode()); - - - - GraphKey graphKey = new GraphKey("APPC", null, "CommonConfiguration", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - Map resourceReferences = new HashMap(); - tc.setResourceReferences(resourceReferences); - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - - } catch (Exception e) { - e.printStackTrace(); - } - - } + } */ } diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestConfigurationDocumentRequest.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestConfigurationDocumentRequest.java index 801b61097..9f6d676b7 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestConfigurationDocumentRequest.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestConfigurationDocumentRequest.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========================================================= */ @@ -35,35 +39,35 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicContext; public class TestConfigurationDocumentRequest /* extends AbstractDGTestCase */ { /* - @Test - public void testSDCMessage() { - try { - String propertyfileName = "SDC-MESSAGE_method_configuration-document-request_TC1.properties"; + @Test + public void testSDCMessage() { + try { + String propertyfileName = "SDC-MESSAGE_method_configuration-document-request_TC1.properties"; - String configurationDocumentRequestXML = "src/main/resources/xml/SDC-MESSAGE_method_configuration-document-request_3.0.0.xml"; + String configurationDocumentRequestXML = "src/main/resources/xml/SDC-MESSAGE_method_configuration-document-request_3.0.0.xml"; - // Register Call graphs - String injectGraphXmls[] = new String[] { configurationDocumentRequestXML}; + // Register Call graphs + String injectGraphXmls[] = new String[] { configurationDocumentRequestXML}; - Map serviceReferences = new HashMap(); - serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode",new org.onap.sdnc.config.generator.convert.ConvertNode()); - serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode()); + Map serviceReferences = new HashMap(); + serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode",new org.onap.sdnc.config.generator.convert.ConvertNode()); + serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode()); - GraphKey graphKey = new GraphKey("SDC-MESSAGE", null, "configuration-document-request", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); + GraphKey graphKey = new GraphKey("SDC-MESSAGE", null, "configuration-document-request", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - } catch (Exception e) { - e.printStackTrace(); - } + } catch (Exception e) { + e.printStackTrace(); + } - } + } */ } diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestConfigure.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestConfigure.java index 052ad7848..6022ac834 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestConfigure.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestConfigure.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========================================================= */ @@ -38,248 +42,248 @@ import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; public class TestConfigure /* extends AbstractDGTestCase */ { - private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestConfigure.class); - public static String ConfigureXML = "src/main/resources/xml/APPC_Configure.xml"; + private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestConfigure.class); + public static String ConfigureXML = "src/main/resources/xml/APPC_Configure.xml"; /* - @Test - public void testTemplateConfigureSuccess() { - try { + @Test + public void testTemplateConfigureSuccess() { + try { + + String propertyfileName = "APPC/Configure/Configure_Success.properties"; + + // Register Call graphs + String injectGraphXmls[] = new String[] { ConfigureXML }; + + Map serviceReferences = new HashMap(); + + + + GraphKey graphKey = new GraphKey("APPC", null, "Configure", null); + DGTestCase tc = new DGTestCase(graphKey); + + + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + + + + } catch (Exception e) { + e.printStackTrace(); + } + } + + + @Test + public void testTemplateConfigureFailure() { + try { + + String propertyfileName = "APPC/Configure/Configure_Failure.properties"; + + // Register Call graphs + String injectGraphXmls[] = new String[] { ConfigureXML }; + + Map serviceReferences = new HashMap(); + + + + GraphKey graphKey = new GraphKey("APPC", null, "Configure", null); + DGTestCase tc = new DGTestCase(graphKey); + + + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + + + + } catch (Exception e) { + e.printStackTrace(); + } + } + + + @Test + public void testGetTemplateFailure() { + try { + + String propertyfileName = "APPC/Configure/GetTemplate_Failure.properties"; + + // Register Call graphs + String injectGraphXmls[] = new String[] { ConfigureXML }; + + Map serviceReferences = new HashMap(); + + + + GraphKey graphKey = new GraphKey("APPC", null, "Configure", null); + DGTestCase tc = new DGTestCase(graphKey); + + + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + + + + } catch (Exception e) { + e.printStackTrace(); + } + } + + + + @Test + public void testGenerateTemplateConfigFailure() { + try { - String propertyfileName = "APPC/Configure/Configure_Success.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { ConfigureXML }; + String propertyfileName = "APPC/Configure/GenerateTemplateConfig_Failure.properties"; - Map serviceReferences = new HashMap(); - - - - GraphKey graphKey = new GraphKey("APPC", null, "Configure", null); - DGTestCase tc = new DGTestCase(graphKey); + // Register Call graphs + String injectGraphXmls[] = new String[] { ConfigureXML }; - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + Map serviceReferences = new HashMap(); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + GraphKey graphKey = new GraphKey("APPC", null, "Configure", null); + DGTestCase tc = new DGTestCase(graphKey); - + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - } catch (Exception e) { - e.printStackTrace(); - } - } - @Test - public void testTemplateConfigureFailure() { - try { + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - String propertyfileName = "APPC/Configure/Configure_Failure.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { ConfigureXML }; - Map serviceReferences = new HashMap(); - - - - GraphKey graphKey = new GraphKey("APPC", null, "Configure", null); - DGTestCase tc = new DGTestCase(graphKey); - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + } catch (Exception e) { + e.printStackTrace(); + } + } - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + @Test + public void testConfigBlockConfigureSuccess() { + try { - + String propertyfileName = "APPC/Configure/ConfigBlockConfigure_Success.properties"; + // Register Call graphs + String injectGraphXmls[] = new String[] { ConfigureXML }; - } catch (Exception e) { - e.printStackTrace(); - } - } + Map serviceReferences = new HashMap(); - - @Test - public void testGetTemplateFailure() { - try { - String propertyfileName = "APPC/Configure/GetTemplate_Failure.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { ConfigureXML }; + GraphKey graphKey = new GraphKey("APPC", null, "Configure", null); + DGTestCase tc = new DGTestCase(graphKey); - Map serviceReferences = new HashMap(); - - - - GraphKey graphKey = new GraphKey("APPC", null, "Configure", null); - DGTestCase tc = new DGTestCase(graphKey); - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - public void testGenerateTemplateConfigFailure() { - try { + } catch (Exception e) { + e.printStackTrace(); + } + } - String propertyfileName = "APPC/Configure/GenerateTemplateConfig_Failure.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { ConfigureXML }; + @Test + public void testConfigBlockConfigureFailure() { + try { - Map serviceReferences = new HashMap(); - - - GraphKey graphKey = new GraphKey("APPC", null, "Configure", null); - DGTestCase tc = new DGTestCase(graphKey); + String propertyfileName = "APPC/Configure/ConfigBlockConfigure_Failure.properties"; - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + // Register Call graphs + String injectGraphXmls[] = new String[] { ConfigureXML }; + Map serviceReferences = new HashMap(); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - + GraphKey graphKey = new GraphKey("APPC", null, "Configure", null); + DGTestCase tc = new DGTestCase(graphKey); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - public void testConfigBlockConfigureSuccess() { - try { + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - String propertyfileName = "APPC/Configure/ConfigBlockConfigure_Success.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { ConfigureXML }; - Map serviceReferences = new HashMap(); - - - GraphKey graphKey = new GraphKey("APPC", null, "Configure", null); - DGTestCase tc = new DGTestCase(graphKey); - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - + } catch (Exception e) { + e.printStackTrace(); + } + } - } catch (Exception e) { - e.printStackTrace(); - } - } - @Test - public void testConfigBlockConfigureFailure() { - try { + @Test + public void testGenerateConfigFailure() { + try { - String propertyfileName = "APPC/Configure/ConfigBlockConfigure_Failure.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { ConfigureXML }; + String propertyfileName = "APPC/Configure/GenerateConfig_Failure.properties"; - Map serviceReferences = new HashMap(); - - - GraphKey graphKey = new GraphKey("APPC", null, "Configure", null); - DGTestCase tc = new DGTestCase(graphKey); + // Register Call graphs + String injectGraphXmls[] = new String[] { ConfigureXML }; - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + Map serviceReferences = new HashMap(); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - + GraphKey graphKey = new GraphKey("APPC", null, "Configure", null); + DGTestCase tc = new DGTestCase(graphKey); - } catch (Exception e) { - e.printStackTrace(); - } - } - - - @Test - public void testGenerateConfigFailure() { - try { + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - String propertyfileName = "APPC/Configure/GenerateConfig_Failure.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { ConfigureXML }; - Map serviceReferences = new HashMap(); - - - - GraphKey graphKey = new GraphKey("APPC", null, "Configure", null); - DGTestCase tc = new DGTestCase(graphKey); - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - - } catch (Exception e) { - e.printStackTrace(); - } - } + } catch (Exception e) { + e.printStackTrace(); + } + } */ } diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestDownloadCliConfig.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestDownloadCliConfig.java index 782493c2d..2f6f7459a 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestDownloadCliConfig.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestDownloadCliConfig.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========================================================= */ @@ -38,96 +42,96 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicContext; public class TestDownloadCliConfig /* extends AbstractDGTestCase */ { /* - private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestDownloadIsbcConfig.class); - public static String DownloadCliConfigXML = "src/main/resources/xml/APPC_DownloadCliConfig.xml"; - - @Test - public void testDownloadCliConfigSuccess() { - try { - String propertyfileName = "APPC/DownloadCliConfig/DownloadCliConfig_Success.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { DownloadCliConfigXML }; - - Map serviceReferences = new HashMap(); - - GraphKey graphKey = new GraphKey("APPC", null, "DownloadCliConfig", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - Map resourceReferences = new HashMap(); - tc.setResourceReferences(resourceReferences); - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - //DGMockUtils.printContext(ctx); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - public void testDownloadCliConfigDBFailure() { - try { - - String propertyfileName = "APPC/DownloadCliConfig/DownloadCliConfig_DB_Failure.properties"; - // Register Call graphs - String injectGraphXmls[] = new String[] { DownloadCliConfigXML }; - Map serviceReferences = new HashMap(); - - GraphKey graphKey = new GraphKey("APPC", null, "DownloadCliConfig", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - Map resourceReferences = new HashMap(); - tc.setResourceReferences(resourceReferences); - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - //DGMockUtils.printContext(ctx); - - - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - public void testDownloadCliConfigAdaptorFailure() { - try { - - String propertyfileName = "APPC/DownloadCliConfig/DownloadCliConfig_Adaptor_Failure.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { DownloadCliConfigXML }; - - Map serviceReferences = new HashMap(); - - GraphKey graphKey = new GraphKey("APPC", null, "DownloadCliConfig", null); - DGTestCase tc = new DGTestCase(graphKey); - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - Map resourceReferences = new HashMap(); - tc.setResourceReferences(resourceReferences); - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - //DGMockUtils.printContext(ctx); - - - } catch (Exception e) { - e.printStackTrace(); - } - } + private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestDownloadIsbcConfig.class); + public static String DownloadCliConfigXML = "src/main/resources/xml/APPC_DownloadCliConfig.xml"; + + @Test + public void testDownloadCliConfigSuccess() { + try { + String propertyfileName = "APPC/DownloadCliConfig/DownloadCliConfig_Success.properties"; + + // Register Call graphs + String injectGraphXmls[] = new String[] { DownloadCliConfigXML }; + + Map serviceReferences = new HashMap(); + + GraphKey graphKey = new GraphKey("APPC", null, "DownloadCliConfig", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + Map resourceReferences = new HashMap(); + tc.setResourceReferences(resourceReferences); + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + //DGMockUtils.printContext(ctx); + } catch (Exception e) { + e.printStackTrace(); + } + } + + @Test + public void testDownloadCliConfigDBFailure() { + try { + + String propertyfileName = "APPC/DownloadCliConfig/DownloadCliConfig_DB_Failure.properties"; + // Register Call graphs + String injectGraphXmls[] = new String[] { DownloadCliConfigXML }; + Map serviceReferences = new HashMap(); + + GraphKey graphKey = new GraphKey("APPC", null, "DownloadCliConfig", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + Map resourceReferences = new HashMap(); + tc.setResourceReferences(resourceReferences); + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + //DGMockUtils.printContext(ctx); + + + } catch (Exception e) { + e.printStackTrace(); + } + } + + @Test + public void testDownloadCliConfigAdaptorFailure() { + try { + + String propertyfileName = "APPC/DownloadCliConfig/DownloadCliConfig_Adaptor_Failure.properties"; + + // Register Call graphs + String injectGraphXmls[] = new String[] { DownloadCliConfigXML }; + + Map serviceReferences = new HashMap(); + + GraphKey graphKey = new GraphKey("APPC", null, "DownloadCliConfig", null); + DGTestCase tc = new DGTestCase(graphKey); + + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + Map resourceReferences = new HashMap(); + tc.setResourceReferences(resourceReferences); + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + //DGMockUtils.printContext(ctx); + + + } catch (Exception e) { + e.printStackTrace(); + } + } */ } diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestDownloadIsbcConfig.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestDownloadIsbcConfig.java index 92e39e862..231dd6b0a 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestDownloadIsbcConfig.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestDownloadIsbcConfig.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========================================================= */ @@ -37,115 +41,115 @@ import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; public class TestDownloadIsbcConfig /* extends AbstractDGTestCase */{ - private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestDownloadIsbcConfig.class); - public static String DownloadIsbcConfigXML = "src/main/resources/xml/APPC_DownloadIsbcConfig.xml"; + private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestDownloadIsbcConfig.class); + public static String DownloadIsbcConfigXML = "src/main/resources/xml/APPC_DownloadIsbcConfig.xml"; /* - @Test - public void testDownloadIsbcConfigSuccess() { - try { + @Test + public void testDownloadIsbcConfigSuccess() { + try { + + String propertyfileName = "APPC/DownloadIsbcConfig/DownloadIsbcConfig_Success.properties"; + + // Register Call graphs + String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML }; + + Map serviceReferences = new HashMap(); + + + + + GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null); + DGTestCase tc = new DGTestCase(graphKey); + + + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + + + + } catch (Exception e) { + e.printStackTrace(); + } + } + + + @Test + public void testConfigFileFailure() { + try { + + String propertyfileName = "APPC/DownloadIsbcConfig/ConfigFile_Failure.properties"; + + // Register Call graphs + String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML }; + + Map serviceReferences = new HashMap(); + + + + GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null); + DGTestCase tc = new DGTestCase(graphKey); - String propertyfileName = "APPC/DownloadIsbcConfig/DownloadIsbcConfig_Success.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML }; - Map serviceReferences = new HashMap(); - - - - - GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null); - DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } - } + } catch (Exception e) { + e.printStackTrace(); + } + } - @Test - public void testConfigFileFailure() { - try { - String propertyfileName = "APPC/DownloadIsbcConfig/ConfigFile_Failure.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML }; + @Test + public void testPutFailure() { + try { - Map serviceReferences = new HashMap(); - - - - GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null); - DGTestCase tc = new DGTestCase(graphKey); + String propertyfileName = "APPC/DownloadIsbcConfig/Put_Failure.properties"; - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + // Register Call graphs + String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML }; + Map serviceReferences = new HashMap(); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } - } + GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null); + DGTestCase tc = new DGTestCase(graphKey); - - @Test - public void testPutFailure() { - try { - String propertyfileName = "APPC/DownloadIsbcConfig/Put_Failure.properties"; - - // Register Call graphs - String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML }; + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - Map serviceReferences = new HashMap(); - - - - - GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null); - DGTestCase tc = new DGTestCase(graphKey); - - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } - } + } catch (Exception e) { + e.printStackTrace(); + } + } */ diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGenerateConfig.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGenerateConfig.java index 8ead2afef..af0423b0d 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGenerateConfig.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGenerateConfig.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========================================================= */ @@ -51,82 +55,82 @@ import org.onap.ccsdk.sli.core.sli.provider.SvcLogicAdaptorFactory; public class TestGenerateConfig /* extends AbstractDGTestCase */ { - private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGenerateConfig.class); - public static String generateConfigXML = "src/main/resources/xml/APPC_GenerateConfig.xml"; + private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGenerateConfig.class); + public static String generateConfigXML = "src/main/resources/xml/APPC_GenerateConfig.xml"; /* - @Test - public void testGenerateConfigWithParameters() { - try { + @Test + public void testGenerateConfigWithParameters() { + try { + + String propertyfileName = "APPC/GenerateConfig/GenerateConfigWithParams.properties"; + //String generateConfigXML = "src/main/resources/xml/APPC_GenerateConfig.xml"; + + // Register Call graphs + String injectGraphXmls[] = new String[] { generateConfigXML }; + + Map serviceReferences = new HashMap(); + + serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode()); + //serviceReferences.put("com.att.appc.config.generator.node.ConfigResourceNode", new MockConfigResourceNode()); + + serviceReferences.put("org.onap.appc.data.services.node.ConfigResourceNode", new MockSvcLogicJavaPlugin()); - String propertyfileName = "APPC/GenerateConfig/GenerateConfigWithParams.properties"; - //String generateConfigXML = "src/main/resources/xml/APPC_GenerateConfig.xml"; - // Register Call graphs - String injectGraphXmls[] = new String[] { generateConfigXML }; + GraphKey graphKey = new GraphKey("APPC", null, "GenerateConfig", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - Map serviceReferences = new HashMap(); - - serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode()); - //serviceReferences.put("com.att.appc.config.generator.node.ConfigResourceNode", new MockConfigResourceNode()); - - serviceReferences.put("org.onap.appc.data.services.node.ConfigResourceNode", new MockSvcLogicJavaPlugin()); - - GraphKey graphKey = new GraphKey("APPC", null, "GenerateConfig", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + } catch (Exception e) { + e.printStackTrace(); + } + } - } catch (Exception e) { - e.printStackTrace(); - } - } + @Test + public void testGenerateConfigWithNoParameters() { + try { + String propertyfileName = "APPC/GenerateConfig/GenerateConfigNoParams.properties"; + //String generateConfigXML = "src/main/resources/xml/APPC_GenerateConfig.xml"; - @Test - public void testGenerateConfigWithNoParameters() { - try { + // Register Call graphs + String injectGraphXmls[] = new String[] { generateConfigXML }; - String propertyfileName = "APPC/GenerateConfig/GenerateConfigNoParams.properties"; - //String generateConfigXML = "src/main/resources/xml/APPC_GenerateConfig.xml"; + Map serviceReferences = new HashMap(); - // Register Call graphs - String injectGraphXmls[] = new String[] { generateConfigXML }; + serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode()); + //serviceReferences.put("com.att.appc.config.generator.node.ConfigResourceNode", new MockConfigResourceNode()); - Map serviceReferences = new HashMap(); - - serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode()); - //serviceReferences.put("com.att.appc.config.generator.node.ConfigResourceNode", new MockConfigResourceNode()); - - serviceReferences.put("org.onap.appc.data.services.node.ConfigResourceNode", new MockSvcLogicJavaPlugin()); + serviceReferences.put("org.onap.appc.data.services.node.ConfigResourceNode", new MockSvcLogicJavaPlugin()); - GraphKey graphKey = new GraphKey("APPC", null, "GenerateConfig", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); + GraphKey graphKey = new GraphKey("APPC", null, "GenerateConfig", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - } catch (Exception e) { - e.printStackTrace(); - } - } + } catch (Exception e) { + e.printStackTrace(); + } + } */ diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGenerateTemplateConfig.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGenerateTemplateConfig.java index cd279f326..3223cb9e7 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGenerateTemplateConfig.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGenerateTemplateConfig.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========================================================= */ @@ -40,72 +44,72 @@ import com.att.sdnctl.dgtestlibrary.GraphKey; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; public class TestGenerateTemplateConfig /* extends AbstractDGTestCase */ { - private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGenerateTemplateConfig.class); + private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGenerateTemplateConfig.class); /* - public static String generateConfigXML = "src/main/resources/xml/APPC_GenerateTemplateConfig.xml"; + public static String generateConfigXML = "src/main/resources/xml/APPC_GenerateTemplateConfig.xml"; + + @Test + public void testGenerateTemplateConfigWithParameters() { + try { + + String propertyfileName = "APPC/GenerateTemplateConfig/GenerateTemplateConfigWithParams.properties"; + Map serviceReferences = new HashMap(); + - @Test - public void testGenerateTemplateConfigWithParameters() { - try { + serviceReferences.put("org.onap.appc.data.services.node.ConfigResourceNode", new MockSvcLogicJavaPlugin()); + serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode()); - String propertyfileName = "APPC/GenerateTemplateConfig/GenerateTemplateConfigWithParams.properties"; - Map serviceReferences = new HashMap(); + // Register Call graphs + String injectGraphXmls[] = new String[] { generateConfigXML }; - - serviceReferences.put("org.onap.appc.data.services.node.ConfigResourceNode", new MockSvcLogicJavaPlugin()); - serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode()); + GraphKey graphKey = new GraphKey("APPC", null, "GenerateTemplateConfig", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - // Register Call graphs - String injectGraphXmls[] = new String[] { generateConfigXML }; + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - GraphKey graphKey = new GraphKey("APPC", null, "GenerateTemplateConfig", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + } catch (Exception e) { + e.printStackTrace(); + } + } - - } catch (Exception e) { - e.printStackTrace(); - } - } + @Test + public void testGenerateTemplateConfigWithNoParameters() { + try { - @Test - public void testGenerateTemplateConfigWithNoParameters() { - try { + String propertyfileName = "APPC/GenerateTemplateConfig/GenerateTemplateConfigNoParams.properties"; + Map serviceReferences = new HashMap(); - String propertyfileName = "APPC/GenerateTemplateConfig/GenerateTemplateConfigNoParams.properties"; - Map serviceReferences = new HashMap(); - - serviceReferences.put("org.onap.appc.data.services.node.ConfigResourceNode", new MockSvcLogicJavaPlugin()); - serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode()); + serviceReferences.put("org.onap.appc.data.services.node.ConfigResourceNode", new MockSvcLogicJavaPlugin()); + serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode()); - // Register Call graphs - String injectGraphXmls[] = new String[] { generateConfigXML }; + // Register Call graphs + String injectGraphXmls[] = new String[] { generateConfigXML }; - GraphKey graphKey = new GraphKey("APPC", null, "GenerateTemplateConfig", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); + GraphKey graphKey = new GraphKey("APPC", null, "GenerateTemplateConfig", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - } catch (Exception e) { - e.printStackTrace(); - } - } + } catch (Exception e) { + e.printStackTrace(); + } + } */ diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetAaiInfo.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetAaiInfo.java index 6674054cb..f7307acb2 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetAaiInfo.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetAaiInfo.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========================================================= */ @@ -41,106 +45,106 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicContext; public class TestGetAaiInfo /* extends AbstractDGTestCase */{ /* - - private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGetAaiInfo.class); - public static String getAaiInfoXML = "src/main/resources/xml/APPC_GetAaiInfo.xml"; - - - - - @Test - public void testGetSuccess() { - try { - - - String propertyfileName = "APPC/GetAaiInfo/GetInfoSuccess.properties"; - Map serviceReferences = new HashMap(); - - - - - // Register Call graphs - String injectGraphXmls[] = new String[] { getAaiInfoXML}; - - - GraphKey graphKey = new GraphKey("APPC", null, "GetAaiInfo", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - - @Test - public void testGetVnfFail() { - try { - - - String propertyfileName = "APPC/GetAaiInfo/GetVnfFail.properties"; - Map serviceReferences = new HashMap(); - - - - - // Register Call graphs - String injectGraphXmls[] = new String[] { getAaiInfoXML}; - - - GraphKey graphKey = new GraphKey("APPC", null, "GetAaiInfo", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - public void testGetVServerFail() { - try { - - - String propertyfileName = "APPC/GetAaiInfo/GetVServerFail.properties"; - Map serviceReferences = new HashMap(); - - - - - // Register Call graphs - String injectGraphXmls[] = new String[] { getAaiInfoXML}; - - - GraphKey graphKey = new GraphKey("APPC", null, "GetAaiInfo", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } - } -*/ + + private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGetAaiInfo.class); + public static String getAaiInfoXML = "src/main/resources/xml/APPC_GetAaiInfo.xml"; + + + + + @Test + public void testGetSuccess() { + try { + + + String propertyfileName = "APPC/GetAaiInfo/GetInfoSuccess.properties"; + Map serviceReferences = new HashMap(); + + + + + // Register Call graphs + String injectGraphXmls[] = new String[] { getAaiInfoXML}; + + + GraphKey graphKey = new GraphKey("APPC", null, "GetAaiInfo", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + + @Test + public void testGetVnfFail() { + try { + + + String propertyfileName = "APPC/GetAaiInfo/GetVnfFail.properties"; + Map serviceReferences = new HashMap(); + + + + + // Register Call graphs + String injectGraphXmls[] = new String[] { getAaiInfoXML}; + + + GraphKey graphKey = new GraphKey("APPC", null, "GetAaiInfo", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + @Test + public void testGetVServerFail() { + try { + + + String propertyfileName = "APPC/GetAaiInfo/GetVServerFail.properties"; + Map serviceReferences = new HashMap(); + + + + + // Register Call graphs + String injectGraphXmls[] = new String[] { getAaiInfoXML}; + + + GraphKey graphKey = new GraphKey("APPC", null, "GetAaiInfo", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + } catch (Exception e) { + e.printStackTrace(); + } + } +*/ } - + diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetConfigParams.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetConfigParams.java index d14bb8339..52e20415e 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetConfigParams.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetConfigParams.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========================================================= */ @@ -37,241 +41,241 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicContext; public class TestGetConfigParams /* extends AbstractDGTestCase */ { - + /* - - public static String getConfigParamsXML = "src/main/resources/xml/APPC_GetConfigParams.xml"; + + public static String getConfigParamsXML = "src/main/resources/xml/APPC_GetConfigParams.xml"; + + + + @Test + public void testGetConfigParamsWithDefaultTemplate() { + try { + + String propertyfileName = "APPC/GetConfigParams/DefaultTemplate.properties"; + Map serviceReferences = new HashMap(); + + + serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode", new org.onap.sdnc.config.generator.convert.ConvertNode()); + + // Register Call graphs + String injectGraphXmls[] = new String[] { getConfigParamsXML }; + + + GraphKey graphKey = new GraphKey("APPC", null, "GetConfigParams", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + + + } catch (Exception e) { + e.printStackTrace(); + } + + } + + + + + @Test + public void testGetConfigParamsWithTemplateName() { + try { + + + String propertyfileName = "APPC/GetConfigParams/TemplateName.properties"; + Map serviceReferences = new HashMap(); + + serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode", new org.onap.sdnc.config.generator.convert.ConvertNode()); + + // Register Call graphs + String injectGraphXmls[] = new String[] { getConfigParamsXML }; + + + GraphKey graphKey = new GraphKey("APPC", null, "GetConfigParams", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + - @Test - public void testGetConfigParamsWithDefaultTemplate() { - try { + } catch (Exception e) { + e.printStackTrace(); + } + } - String propertyfileName = "APPC/GetConfigParams/DefaultTemplate.properties"; - Map serviceReferences = new HashMap(); - - serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode", new org.onap.sdnc.config.generator.convert.ConvertNode()); + @Test + public void testGetConfigParamsWithCliString() { + try { - // Register Call graphs - String injectGraphXmls[] = new String[] { getConfigParamsXML }; + String propertyfileName = "APPC/GetConfigParams/CliString.properties"; + Map serviceReferences = new HashMap(); + serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode", new org.onap.sdnc.config.generator.convert.ConvertNode()); - GraphKey graphKey = new GraphKey("APPC", null, "GetConfigParams", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + // Register Call graphs + String injectGraphXmls[] = new String[] { getConfigParamsXML }; - - } catch (Exception e) { - e.printStackTrace(); - } + GraphKey graphKey = new GraphKey("APPC", null, "GetConfigParams", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - } + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - @Test - public void testGetConfigParamsWithTemplateName() { - try { + } catch (Exception e) { + e.printStackTrace(); + } + } + @Test + public void testGetConfigParamsWithCliJson() { + try { - String propertyfileName = "APPC/GetConfigParams/TemplateName.properties"; - Map serviceReferences = new HashMap(); - serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode", new org.onap.sdnc.config.generator.convert.ConvertNode()); + String propertyfileName = "APPC/GetConfigParams/CliJson.properties"; + Map serviceReferences = new HashMap(); - // Register Call graphs - String injectGraphXmls[] = new String[] { getConfigParamsXML }; - GraphKey graphKey = new GraphKey("APPC", null, "GetConfigParams", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode", new org.onap.sdnc.config.generator.convert.ConvertNode()); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + // Register Call graphs + String injectGraphXmls[] = new String[] { getConfigParamsXML }; + GraphKey graphKey = new GraphKey("APPC", null, "GetConfigParams", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - - } catch (Exception e) { - e.printStackTrace(); - } - } + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - @Test - public void testGetConfigParamsWithCliString() { - try { - String propertyfileName = "APPC/GetConfigParams/CliString.properties"; - Map serviceReferences = new HashMap(); - serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode", new org.onap.sdnc.config.generator.convert.ConvertNode()); - - // Register Call graphs - String injectGraphXmls[] = new String[] { getConfigParamsXML }; + } catch (Exception e) { + e.printStackTrace(); + } + } - GraphKey graphKey = new GraphKey("APPC", null, "GetConfigParams", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + @Test + public void testGetConfigParamsForRestore() { + try { + String propertyfileName = "APPC/GetConfigParams/Restore.properties"; + Map serviceReferences = new HashMap(); - - } catch (Exception e) { - e.printStackTrace(); - } - } - @Test - public void testGetConfigParamsWithCliJson() { - try { + serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode", new org.onap.sdnc.config.generator.convert.ConvertNode()); - String propertyfileName = "APPC/GetConfigParams/CliJson.properties"; - Map serviceReferences = new HashMap(); + // Register Call graphs + String injectGraphXmls[] = new String[] { getConfigParamsXML }; - - - serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode", new org.onap.sdnc.config.generator.convert.ConvertNode()); - // Register Call graphs - String injectGraphXmls[] = new String[] { getConfigParamsXML }; + GraphKey graphKey = new GraphKey("APPC", null, "GetConfigParams", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - GraphKey graphKey = new GraphKey("APPC", null, "GetConfigParams", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + } catch (Exception e) { + e.printStackTrace(); + } + } - - } catch (Exception e) { - e.printStackTrace(); - } - } + @Test + public void testGetConfigParamsCommonConfigFail() { + try { + String propertyfileName = "APPC/GetConfigParams/CommonConfigFail.properties"; + Map serviceReferences = new HashMap(); + serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode", new org.onap.sdnc.config.generator.convert.ConvertNode()); - @Test - public void testGetConfigParamsForRestore() { - try { - String propertyfileName = "APPC/GetConfigParams/Restore.properties"; - Map serviceReferences = new HashMap(); + // Register Call graphs + String injectGraphXmls[] = new String[] { getConfigParamsXML }; - - - serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode", new org.onap.sdnc.config.generator.convert.ConvertNode()); - // Register Call graphs - String injectGraphXmls[] = new String[] { getConfigParamsXML }; + GraphKey graphKey = new GraphKey("APPC", null, "GetConfigParams", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - GraphKey graphKey = new GraphKey("APPC", null, "GetConfigParams", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } - } - @Test - public void testGetConfigParamsCommonConfigFail() { - try { - String propertyfileName = "APPC/GetConfigParams/CommonConfigFail.properties"; - Map serviceReferences = new HashMap(); + } catch (Exception e) { + e.printStackTrace(); + } + } - - serviceReferences.put("org.onap.sdnc.config.generator.convert.ConvertNode", new org.onap.sdnc.config.generator.convert.ConvertNode()); - // Register Call graphs - String injectGraphXmls[] = new String[] { getConfigParamsXML }; + @Test + public void testGetConfigParamsJson2DGContextFail() { + try { + String propertyfileName = "APPC/GetConfigParams/Json2DGContextFail.properties"; + Map serviceReferences = new HashMap(); - GraphKey graphKey = new GraphKey("APPC", null, "GetConfigParams", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - - } catch (Exception e) { - e.printStackTrace(); - } - } + // Register Call graphs + String injectGraphXmls[] = new String[] { getConfigParamsXML }; - @Test - public void testGetConfigParamsJson2DGContextFail() { - try { - String propertyfileName = "APPC/GetConfigParams/Json2DGContextFail.properties"; - Map serviceReferences = new HashMap(); + GraphKey graphKey = new GraphKey("APPC", null, "GetConfigParams", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - - - - - // Register Call graphs - String injectGraphXmls[] = new String[] { getConfigParamsXML }; + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - GraphKey graphKey = new GraphKey("APPC", null, "GetConfigParams", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - - } catch (Exception e) { - e.printStackTrace(); - } - } + } catch (Exception e) { + e.printStackTrace(); + } + } */ } diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetDeviceRunningConfig.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetDeviceRunningConfig.java index 48fb106db..b84b0516e 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetDeviceRunningConfig.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetDeviceRunningConfig.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========================================================= */ @@ -35,97 +39,97 @@ import com.att.sdnctl.dgtestlibrary.GraphKey; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; public class TestGetDeviceRunningConfig /* extends AbstractDGTestCase */ { - private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGetConfigParams.class); + private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGetConfigParams.class); /* - public String jsonPath = "src/main/resources/json"; - public String xmlpath = "src/main/resources/xml"; + public String jsonPath = "src/main/resources/json"; + public String xmlpath = "src/main/resources/xml"; - @Test - public void testChefRunningConfigSuccess() { - try { - logger.info("********************************* testChefRunningConfigSuccess *************************************"); - //DGMockUtils.generateXMLFile(jsonPath, xmlpath); + @Test + public void testChefRunningConfigSuccess() { + try { + logger.info("********************************* testChefRunningConfigSuccess *************************************"); + //DGMockUtils.generateXMLFile(jsonPath, xmlpath); - String propertyfileName = "APPC/GetDeviceRunningConfig/Chef_Success.properties"; + String propertyfileName = "APPC/GetDeviceRunningConfig/Chef_Success.properties"; - String getDeviceRunningConfigXML = "src/main/resources/xml/APPC_GetDeviceRunningConfig.xml"; - // Register Call graphs - String injectGraphXmls[] = new String[] { getDeviceRunningConfigXML }; + String getDeviceRunningConfigXML = "src/main/resources/xml/APPC_GetDeviceRunningConfig.xml"; + // Register Call graphs + String injectGraphXmls[] = new String[] { getDeviceRunningConfigXML }; - GraphKey graphKey = new GraphKey("APPC", null, "GetDeviceRunningConfig", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setPropertyfileName(propertyfileName); + GraphKey graphKey = new GraphKey("APPC", null, "GetDeviceRunningConfig", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setPropertyfileName(propertyfileName); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - assertContextWithProperty(ctx); + assertContextWithProperty(ctx); - } catch (Exception e) { - e.printStackTrace(); - } - } + } catch (Exception e) { + e.printStackTrace(); + } + } - @Test - public void testChefRunningConfigFailure() { - try { + @Test + public void testChefRunningConfigFailure() { + try { - logger.info("********************************* testChefRunningConfigFailure *************************************"); - String propertyfileName = "APPC/GetDeviceRunningConfig/Chef_Failure.properties"; + logger.info("********************************* testChefRunningConfigFailure *************************************"); + String propertyfileName = "APPC/GetDeviceRunningConfig/Chef_Failure.properties"; - String getDeviceRunningConfigXML = "src/main/resources/xml/APPC_GetDeviceRunningConfig.xml"; - // Register Call graphs - String injectGraphXmls[] = new String[] { getDeviceRunningConfigXML }; + String getDeviceRunningConfigXML = "src/main/resources/xml/APPC_GetDeviceRunningConfig.xml"; + // Register Call graphs + String injectGraphXmls[] = new String[] { getDeviceRunningConfigXML }; - GraphKey graphKey = new GraphKey("APPC", null, "GetDeviceRunningConfig", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setPropertyfileName(propertyfileName); + GraphKey graphKey = new GraphKey("APPC", null, "GetDeviceRunningConfig", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setPropertyfileName(propertyfileName); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - assertContextWithProperty(ctx); + assertContextWithProperty(ctx); - //DGMockUtils.printContext(ctx); + //DGMockUtils.printContext(ctx); - } catch (Exception e) { - e.printStackTrace(); - } - } + } catch (Exception e) { + e.printStackTrace(); + } + } - @Test - public void testChefRunningConfigOthers() { - try { - logger.info("********************************* testChefRunningConfigOthers *************************************"); - String propertyfileName = "APPC/GetDeviceRunningConfig/Chef_Others.properties"; + @Test + public void testChefRunningConfigOthers() { + try { + logger.info("********************************* testChefRunningConfigOthers *************************************"); + String propertyfileName = "APPC/GetDeviceRunningConfig/Chef_Others.properties"; - String getDeviceRunningConfigXML = "src/main/resources/xml/APPC_GetDeviceRunningConfig.xml"; - // Register Call graphs - String injectGraphXmls[] = new String[] { getDeviceRunningConfigXML }; + String getDeviceRunningConfigXML = "src/main/resources/xml/APPC_GetDeviceRunningConfig.xml"; + // Register Call graphs + String injectGraphXmls[] = new String[] { getDeviceRunningConfigXML }; - GraphKey graphKey = new GraphKey("APPC", null, "GetDeviceRunningConfig", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setPropertyfileName(propertyfileName); + GraphKey graphKey = new GraphKey("APPC", null, "GetDeviceRunningConfig", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setPropertyfileName(propertyfileName); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - assertContextWithProperty(ctx); + assertContextWithProperty(ctx); - //DGMockUtils.printContext(ctx); + //DGMockUtils.printContext(ctx); - } catch (Exception e) { - e.printStackTrace(); - } - } + } catch (Exception e) { + e.printStackTrace(); + } + } */ } diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetVfModuleInfo.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetVfModuleInfo.java index 6bc64f233..6bc9d10e3 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetVfModuleInfo.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestGetVfModuleInfo.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========================================================= */ @@ -52,72 +56,72 @@ import org.onap.ccsdk.sli.core.sli.provider.SvcLogicAdaptorFactory; public class TestGetVfModuleInfo /* extends AbstractDGTestCase */ { - //private final static Logger logger = LoggerFactory.getLogger(TestGetParams.class); + //private final static Logger logger = LoggerFactory.getLogger(TestGetParams.class); /* - private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGetVfModuleInfo.class); - public static String GetVfModuleInfoXML = "src/main/resources/xml/APPC_GetVfModuleInfo.xml"; + private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGetVfModuleInfo.class); + public static String GetVfModuleInfoXML = "src/main/resources/xml/APPC_GetVfModuleInfo.xml"; + + + @Test + public void testGetVfModuleInfoSuccess() { + try { + String propertyfileName = "APPC/GetVfModuleInfo/GetVfModuleInfo_Success.properties"; + Map serviceReferences = new HashMap(); - @Test - public void testGetVfModuleInfoSuccess() { - try { + // Register Call graphs + String injectGraphXmls[] = new String[] { GetVfModuleInfoXML }; - String propertyfileName = "APPC/GetVfModuleInfo/GetVfModuleInfo_Success.properties"; - Map serviceReferences = new HashMap(); - // Register Call graphs - String injectGraphXmls[] = new String[] { GetVfModuleInfoXML }; + GraphKey graphKey = new GraphKey("APPC", null, "GetVfModuleInfo", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - GraphKey graphKey = new GraphKey("APPC", null, "GetVfModuleInfo", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + } catch (Exception e) { + e.printStackTrace(); + } - - } catch (Exception e) { - e.printStackTrace(); - } + } - } + @Test + public void testGetVfModuleInfoFailure() { + try { - @Test - public void testGetVfModuleInfoFailure() { - try { + String propertyfileName = "APPC/GetVfModuleInfo/GetVfModuleInfo_Failure.properties"; + Map serviceReferences = new HashMap(); - String propertyfileName = "APPC/GetVfModuleInfo/GetVfModuleInfo_Failure.properties"; - Map serviceReferences = new HashMap(); + // Register Call graphs + String injectGraphXmls[] = new String[] { GetVfModuleInfoXML }; - // Register Call graphs - String injectGraphXmls[] = new String[] { GetVfModuleInfoXML }; + GraphKey graphKey = new GraphKey("APPC", null, "GetVfModuleInfo", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - GraphKey graphKey = new GraphKey("APPC", null, "GetVfModuleInfo", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + } catch (Exception e) { + e.printStackTrace(); + } - } catch (Exception e) { - e.printStackTrace(); - } + } - } - */ } diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestProcessParameterDefinition.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestProcessParameterDefinition.java index fd14d83cd..56b0bab3b 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestProcessParameterDefinition.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestProcessParameterDefinition.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========================================================= */ @@ -39,216 +43,216 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicContext; public class TestProcessParameterDefinition /* extends AbstractDGTestCase */ { - - private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestProcessParameterDefinition.class); - public static String getProcessPDXML = "src/main/resources/xml/APPC_ProcessParameterDefinition.xml"; + + private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestProcessParameterDefinition.class); + public static String getProcessPDXML = "src/main/resources/xml/APPC_ProcessParameterDefinition.xml"; /* - - @Test - public void testProcessPD() { - try { - - - String propertyfileName = "APPC/ProcessParameterDefinition/ProcessPD.properties"; - Map serviceReferences = new HashMap(); - - - - serviceReferences.put("org.onap.sdnc.config.params.parser.PropertyDefinitionNode", new org.onap.sdnc.config.params.parser.PropertyDefinitionNode()); - - - - // Register Call graphs - String injectGraphXmls[] = new String[] { getProcessPDXML }; - - - GraphKey graphKey = new GraphKey("APPC", null, "ProcessParameterDefinition", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - //System.out.println(ctx.getAttribute("tmp.allParams.configuration-parameters")); - } catch (Exception e) { - e.printStackTrace(); - } - } - - - - @Test - public void testGetPDFail() { - try { - - - String propertyfileName = "APPC/ProcessParameterDefinition/GetPDFail.properties"; - Map serviceReferences = new HashMap(); - - - - serviceReferences.put("org.onap.sdnc.config.params.parser.PropertyDefinitionNode", new org.onap.sdnc.config.params.parser.PropertyDefinitionNode()); - - - - // Register Call graphs - String injectGraphXmls[] = new String[] { getProcessPDXML }; - - - GraphKey graphKey = new GraphKey("APPC", null, "ProcessParameterDefinition", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } - - } - @Test - public void testNoInstarParams() { - try { - - - String propertyfileName = "APPC/ProcessParameterDefinition/NoInstarParams.properties"; - Map serviceReferences = new HashMap(); - - - - serviceReferences.put("org.onap.sdnc.config.params.parser.PropertyDefinitionNode", new org.onap.sdnc.config.params.parser.PropertyDefinitionNode()); - - - - // Register Call graphs - String injectGraphXmls[] = new String[] { getProcessPDXML }; - - - GraphKey graphKey = new GraphKey("APPC", null, "ProcessParameterDefinition", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - - @Test - public void testGetInstarParamsFail() { - try { - - - String propertyfileName = "APPC/ProcessParameterDefinition/GetInstarParamsFail.properties"; - Map serviceReferences = new HashMap(); - - - - - - // Register Call graphs - String injectGraphXmls[] = new String[] { getProcessPDXML }; - - - GraphKey graphKey = new GraphKey("APPC", null, "ProcessParameterDefinition", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - - @Test - public void testMergeParamsFail() { - try { - - - String propertyfileName = "APPC/ProcessParameterDefinition/MergeParamsFail.properties"; - Map serviceReferences = new HashMap(); - - - - - - // Register Call graphs - String injectGraphXmls[] = new String[] { getProcessPDXML }; - - - GraphKey graphKey = new GraphKey("APPC", null, "ProcessParameterDefinition", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - - @Test - public void testSaveMdSal() { - try { - - - String propertyfileName = "APPC/ProcessParameterDefinition/SaveMdsalFail.properties"; - Map serviceReferences = new HashMap(); - - - - serviceReferences.put("org.onap.sdnc.config.params.parser.PropertyDefinitionNode", new org.onap.sdnc.config.params.parser.PropertyDefinitionNode()); - - - - // Register Call graphs - String injectGraphXmls[] = new String[] { getProcessPDXML }; - - - GraphKey graphKey = new GraphKey("APPC", null, "ProcessParameterDefinition", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - //System.out.println(ctx.getAttribute("tmp.allParams.configuration-parameters")); - } catch (Exception e) { - e.printStackTrace(); - } - } -*/ + + @Test + public void testProcessPD() { + try { + + + String propertyfileName = "APPC/ProcessParameterDefinition/ProcessPD.properties"; + Map serviceReferences = new HashMap(); + + + + serviceReferences.put("org.onap.sdnc.config.params.parser.PropertyDefinitionNode", new org.onap.sdnc.config.params.parser.PropertyDefinitionNode()); + + + + // Register Call graphs + String injectGraphXmls[] = new String[] { getProcessPDXML }; + + + GraphKey graphKey = new GraphKey("APPC", null, "ProcessParameterDefinition", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + //System.out.println(ctx.getAttribute("tmp.allParams.configuration-parameters")); + } catch (Exception e) { + e.printStackTrace(); + } + } + + + + @Test + public void testGetPDFail() { + try { + + + String propertyfileName = "APPC/ProcessParameterDefinition/GetPDFail.properties"; + Map serviceReferences = new HashMap(); + + + + serviceReferences.put("org.onap.sdnc.config.params.parser.PropertyDefinitionNode", new org.onap.sdnc.config.params.parser.PropertyDefinitionNode()); + + + + // Register Call graphs + String injectGraphXmls[] = new String[] { getProcessPDXML }; + + + GraphKey graphKey = new GraphKey("APPC", null, "ProcessParameterDefinition", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + } catch (Exception e) { + e.printStackTrace(); + } + + } + @Test + public void testNoInstarParams() { + try { + + + String propertyfileName = "APPC/ProcessParameterDefinition/NoInstarParams.properties"; + Map serviceReferences = new HashMap(); + + + + serviceReferences.put("org.onap.sdnc.config.params.parser.PropertyDefinitionNode", new org.onap.sdnc.config.params.parser.PropertyDefinitionNode()); + + + + // Register Call graphs + String injectGraphXmls[] = new String[] { getProcessPDXML }; + + + GraphKey graphKey = new GraphKey("APPC", null, "ProcessParameterDefinition", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + + @Test + public void testGetInstarParamsFail() { + try { + + + String propertyfileName = "APPC/ProcessParameterDefinition/GetInstarParamsFail.properties"; + Map serviceReferences = new HashMap(); + + + + + + // Register Call graphs + String injectGraphXmls[] = new String[] { getProcessPDXML }; + + + GraphKey graphKey = new GraphKey("APPC", null, "ProcessParameterDefinition", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + + @Test + public void testMergeParamsFail() { + try { + + + String propertyfileName = "APPC/ProcessParameterDefinition/MergeParamsFail.properties"; + Map serviceReferences = new HashMap(); + + + + + + // Register Call graphs + String injectGraphXmls[] = new String[] { getProcessPDXML }; + + + GraphKey graphKey = new GraphKey("APPC", null, "ProcessParameterDefinition", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + + @Test + public void testSaveMdSal() { + try { + + + String propertyfileName = "APPC/ProcessParameterDefinition/SaveMdsalFail.properties"; + Map serviceReferences = new HashMap(); + + + + serviceReferences.put("org.onap.sdnc.config.params.parser.PropertyDefinitionNode", new org.onap.sdnc.config.params.parser.PropertyDefinitionNode()); + + + + // Register Call graphs + String injectGraphXmls[] = new String[] { getProcessPDXML }; + + + GraphKey graphKey = new GraphKey("APPC", null, "ProcessParameterDefinition", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + + + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); + + //System.out.println(ctx.getAttribute("tmp.allParams.configuration-parameters")); + } catch (Exception e) { + e.printStackTrace(); + } + } +*/ } - + diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestPublishConfiguration.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestPublishConfiguration.java index b00194d7a..8f20df720 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestPublishConfiguration.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestPublishConfiguration.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========================================================= */ diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestSaveRunningConfig.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestSaveRunningConfig.java index c85bfb3f7..f2399729e 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestSaveRunningConfig.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestSaveRunningConfig.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========================================================= */ @@ -51,100 +55,100 @@ import org.onap.ccsdk.sli.core.sli.provider.SvcLogicAdaptorFactory; public class TestSaveRunningConfig /* extends AbstractDGTestCase */{ - //private final static Logger logger = LoggerFactory.getLogger(TestGetParams.class); - private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestSaveRunningConfig.class); - public static String SaveRunningConfigXML = "src/main/resources/xml/APPC_SaveRunningConfig.xml"; + //private final static Logger logger = LoggerFactory.getLogger(TestGetParams.class); + private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestSaveRunningConfig.class); + public static String SaveRunningConfigXML = "src/main/resources/xml/APPC_SaveRunningConfig.xml"; /* - @Test - public void testSaveRunningConfigSuccess() { - try { + @Test + public void testSaveRunningConfigSuccess() { + try { + + String propertyfileName = "APPC/SaveRunningConfig/SaveRunningConfig_Success.properties"; + Map serviceReferences = new HashMap(); - String propertyfileName = "APPC/SaveRunningConfig/SaveRunningConfig_Success.properties"; - Map serviceReferences = new HashMap(); + // Register Call graphs + String injectGraphXmls[] = new String[] { SaveRunningConfigXML }; - // Register Call graphs - String injectGraphXmls[] = new String[] { SaveRunningConfigXML }; + GraphKey graphKey = new GraphKey("APPC", null, "SaveRunningConfig", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - GraphKey graphKey = new GraphKey("APPC", null, "SaveRunningConfig", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } + } catch (Exception e) { + e.printStackTrace(); + } - } + } - @Test - public void testSaveRunningConfigFailure() { - try { + @Test + public void testSaveRunningConfigFailure() { + try { - String propertyfileName = "APPC/SaveRunningConfig/SaveRunningConfig_Failure.properties"; - Map serviceReferences = new HashMap(); + String propertyfileName = "APPC/SaveRunningConfig/SaveRunningConfig_Failure.properties"; + Map serviceReferences = new HashMap(); - // Register Call graphs - String injectGraphXmls[] = new String[] { SaveRunningConfigXML }; + // Register Call graphs + String injectGraphXmls[] = new String[] { SaveRunningConfigXML }; - GraphKey graphKey = new GraphKey("APPC", null, "SaveRunningConfig", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); + GraphKey graphKey = new GraphKey("APPC", null, "SaveRunningConfig", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - } catch (Exception e) { - e.printStackTrace(); - } + } catch (Exception e) { + e.printStackTrace(); + } - } + } - @Test - public void testSaveRunningUploadConfigFailure() { - try { + @Test + public void testSaveRunningUploadConfigFailure() { + try { - String propertyfileName = "APPC/SaveRunningConfig/UploadConfig_Failure.properties"; - Map serviceReferences = new HashMap(); + String propertyfileName = "APPC/SaveRunningConfig/UploadConfig_Failure.properties"; + Map serviceReferences = new HashMap(); - // Register Call graphs - String injectGraphXmls[] = new String[] { SaveRunningConfigXML }; + // Register Call graphs + String injectGraphXmls[] = new String[] { SaveRunningConfigXML }; - GraphKey graphKey = new GraphKey("APPC", null, "SaveRunningConfig", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); + GraphKey graphKey = new GraphKey("APPC", null, "SaveRunningConfig", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - } catch (Exception e) { - e.printStackTrace(); - } + } catch (Exception e) { + e.printStackTrace(); + } - } + } */ diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestSetStatus.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestSetStatus.java index 4f7dc5cf1..943edf2c1 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestSetStatus.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestSetStatus.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========================================================= */ @@ -51,102 +55,102 @@ import org.onap.ccsdk.sli.core.sli.provider.SvcLogicAdaptorFactory; public class TestSetStatus /* extends AbstractDGTestCase */ { - //private final static Logger logger = LoggerFactory.getLogger(TestGetParams.class); - private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestSetStatus.class); - public static String SetStatusXML = "src/main/resources/xml/APPC_SetStatus.xml"; + //private final static Logger logger = LoggerFactory.getLogger(TestGetParams.class); + private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestSetStatus.class); + public static String SetStatusXML = "src/main/resources/xml/APPC_SetStatus.xml"; /* - @Test - public void testSetStatusSuccess() { - try { + @Test + public void testSetStatusSuccess() { + try { + + String propertyfileName = "APPC/SetStatus/SetStatus_Success.properties"; + Map serviceReferences = new HashMap(); - String propertyfileName = "APPC/SetStatus/SetStatus_Success.properties"; - Map serviceReferences = new HashMap(); + // Register Call graphs + String injectGraphXmls[] = new String[] { SetStatusXML }; - // Register Call graphs - String injectGraphXmls[] = new String[] { SetStatusXML }; + GraphKey graphKey = new GraphKey("APPC", null, "SetStatus", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - GraphKey graphKey = new GraphKey("APPC", null, "SetStatus", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } + } catch (Exception e) { + e.printStackTrace(); + } - } + } - @Test - public void testSetStatusAaiFailure() { - try { + @Test + public void testSetStatusAaiFailure() { + try { - String propertyfileName = "APPC/SetStatus/SetStatus_AaiFailure.properties"; - Map serviceReferences = new HashMap(); + String propertyfileName = "APPC/SetStatus/SetStatus_AaiFailure.properties"; + Map serviceReferences = new HashMap(); - // Register Call graphs - String injectGraphXmls[] = new String[] { SetStatusXML }; + // Register Call graphs + String injectGraphXmls[] = new String[] { SetStatusXML }; - GraphKey graphKey = new GraphKey("APPC", null, "SetStatus", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); + GraphKey graphKey = new GraphKey("APPC", null, "SetStatus", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - } catch (Exception e) { - e.printStackTrace(); - } + } catch (Exception e) { + e.printStackTrace(); + } - } + } - @Test - public void testSetStatusFailure() { - try { + @Test + public void testSetStatusFailure() { + try { - String propertyfileName = "APPC/SetStatus/SetStatus_SaveRunningFailure.properties"; - Map serviceReferences = new HashMap(); + String propertyfileName = "APPC/SetStatus/SetStatus_SaveRunningFailure.properties"; + Map serviceReferences = new HashMap(); - // Register Call graphs - String injectGraphXmls[] = new String[] { SetStatusXML }; + // Register Call graphs + String injectGraphXmls[] = new String[] { SetStatusXML }; - GraphKey graphKey = new GraphKey("APPC", null, "SetStatus", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); + GraphKey graphKey = new GraphKey("APPC", null, "SetStatus", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - } catch (Exception e) { - e.printStackTrace(); - } + } catch (Exception e) { + e.printStackTrace(); + } - } + } */ diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestUpdateAaiInfo.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestUpdateAaiInfo.java index e8733b54e..9eed43e8b 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestUpdateAaiInfo.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/TestUpdateAaiInfo.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========================================================= */ @@ -52,115 +56,115 @@ import org.onap.ccsdk.sli.core.sli.provider.SvcLogicAdaptorFactory; public class TestUpdateAaiInfo /* extends AbstractDGTestCase */ { - //private final static Logger logger = LoggerFactory.getLogger(TestGetParams.class); - private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestUpdateAaiInfo.class); - public static String UpdateAaiInfoXML = "src/main/resources/xml/APPC_UpdateAaiInfo.xml"; + //private final static Logger logger = LoggerFactory.getLogger(TestGetParams.class); + private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestUpdateAaiInfo.class); + public static String UpdateAaiInfoXML = "src/main/resources/xml/APPC_UpdateAaiInfo.xml"; /* - @Test - public void testUpdateAaiInfoSuccess() { - try { + @Test + public void testUpdateAaiInfoSuccess() { + try { + + String propertyfileName = "APPC/UpdateAaiInfo/Update_Success.properties"; + Map serviceReferences = new HashMap(); + + // Register Call graphs + String injectGraphXmls[] = new String[] { UpdateAaiInfoXML }; + + + Map resourceReferences = new HashMap(); + + + resourceReferences.put("org.openecomp.sdnc.sli.aai.AAIService", new MockAaiResource()); + + GraphKey graphKey = new GraphKey("APPC", null, "UpdateAaiInfo", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + tc.setResourceReferences(resourceReferences); - String propertyfileName = "APPC/UpdateAaiInfo/Update_Success.properties"; - Map serviceReferences = new HashMap(); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - // Register Call graphs - String injectGraphXmls[] = new String[] { UpdateAaiInfoXML }; - - Map resourceReferences = new HashMap(); + } catch (Exception e) { + e.printStackTrace(); + } - - resourceReferences.put("org.onap.ccsdk.sli.adaptors.aai.AAIService", new MockAaiResource()); + } - GraphKey graphKey = new GraphKey("APPC", null, "UpdateAaiInfo", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - tc.setResourceReferences(resourceReferences); - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + @Test + public void testUpdateAaiInfoFail() { + try { - } catch (Exception e) { - e.printStackTrace(); - } + String propertyfileName = "APPC/UpdateAaiInfo/Update_Fail.properties"; + Map serviceReferences = new HashMap(); - } + // Register Call graphs + String injectGraphXmls[] = new String[] { UpdateAaiInfoXML }; - @Test - public void testUpdateAaiInfoFail() { - try { - String propertyfileName = "APPC/UpdateAaiInfo/Update_Fail.properties"; - Map serviceReferences = new HashMap(); + GraphKey graphKey = new GraphKey("APPC", null, "UpdateAaiInfo", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + Map resourceReferences = new HashMap(); + tc.setResourceReferences(resourceReferences); - // Register Call graphs - String injectGraphXmls[] = new String[] { UpdateAaiInfoXML }; + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - GraphKey graphKey = new GraphKey("APPC", null, "UpdateAaiInfo", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); - - Map resourceReferences = new HashMap(); - tc.setResourceReferences(resourceReferences); - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); + } catch (Exception e) { + e.printStackTrace(); + } - + } - } catch (Exception e) { - e.printStackTrace(); - } - } + @Test + public void testGetVnfcRefFail() { + try { + String propertyfileName = "APPC/UpdateAaiInfo/GetVnfcRef_Fail.properties"; + Map serviceReferences = new HashMap(); - @Test - public void testGetVnfcRefFail() { - try { - String propertyfileName = "APPC/UpdateAaiInfo/GetVnfcRef_Fail.properties"; - Map serviceReferences = new HashMap(); + // Register Call graphs + String injectGraphXmls[] = new String[] { UpdateAaiInfoXML }; - // Register Call graphs - String injectGraphXmls[] = new String[] { UpdateAaiInfoXML }; + GraphKey graphKey = new GraphKey("APPC", null, "UpdateAaiInfo", null); + DGTestCase tc = new DGTestCase(graphKey); + tc.setInjectGraphXmls(injectGraphXmls); + tc.setServiceReferences(serviceReferences); + tc.setPropertyfileName(propertyfileName); + Map resourceReferences = new HashMap(); + tc.setResourceReferences(resourceReferences); - GraphKey graphKey = new GraphKey("APPC", null, "UpdateAaiInfo", null); - DGTestCase tc = new DGTestCase(graphKey); - tc.setInjectGraphXmls(injectGraphXmls); - tc.setServiceReferences(serviceReferences); - tc.setPropertyfileName(propertyfileName); + SvcLogicContext ctx = new SvcLogicContext(); + processTestCase(tc, ctx); - Map resourceReferences = new HashMap(); - tc.setResourceReferences(resourceReferences); - - SvcLogicContext ctx = new SvcLogicContext(); - processTestCase(tc, ctx); - - } catch (Exception e) { - e.printStackTrace(); - } + } catch (Exception e) { + e.printStackTrace(); + } - } + } */ } diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/mock/instance/MockAaiResource.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/mock/instance/MockAaiResource.java index 9f93b51a9..6d23d13ff 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/mock/instance/MockAaiResource.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/mock/instance/MockAaiResource.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========================================================= */ diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/mock/instance/MockConfigureNodeExecutor.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/mock/instance/MockConfigureNodeExecutor.java index 4d2e4c9b4..7c2247a26 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/mock/instance/MockConfigureNodeExecutor.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/mock/instance/MockConfigureNodeExecutor.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========================================================= */ diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/mock/instance/MockSvcLogicJavaPlugin.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/mock/instance/MockSvcLogicJavaPlugin.java index aeea98a97..c53e56689 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/mock/instance/MockSvcLogicJavaPlugin.java +++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/onap/appc/dg/mock/instance/MockSvcLogicJavaPlugin.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========================================================= */ -- cgit 1.2.3-korg