summaryrefslogtreecommitdiffstats
path: root/appc-config/appc-config-params/provider/src/test
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-08-20 15:43:34 +0530
committerTakamune Cho <tc012c@att.com>2018-08-20 23:41:10 +0000
commit9d1e990eadaad1a907d9e34f126f5a7326f6bbd3 (patch)
tree8c75e00557a497674c090aeae11d0b7b23fb06cc /appc-config/appc-config-params/provider/src/test
parent89e8b994334df1611c21a77eaf084ac8f3e038bb (diff)
added test to cover catch portion of exception
to increase code coverage Issue-ID: APPC-1086 Change-Id: I91dcb8497ad2d5fe88238f1979f413584803d000 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-config/appc-config-params/provider/src/test')
-rw-r--r--appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java b/appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java
index 2fdc90ac3..b4e9bc5fe 100644
--- a/appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java
+++ b/appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java
@@ -6,7 +6,7 @@
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
- * Modification Copyright (C) 2018 IBM
+ * Modifications Copyright (C) 2018 IBM
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -171,6 +171,14 @@ public class TestPropertyDefinitionNode {
}
+ @Test(expected = SvcLogicException.class)
+ public void testMergeJsonDataCatchPortion() throws Exception {
+ Map<String, String> inParams = new HashMap<String, String>();
+ inParams.put(ParamsHandlerConstant.INPUT_PARAM_RESPONSE_PRIFIX, "test");
+ SvcLogicContext ctx = new SvcLogicContext();
+ propertyDefinitionNode.mergeJsonData(inParams, ctx);
+ }
+
@Test
public void testArtificatTransformer() throws Exception {
ArtificatTransformer transformer = new ArtificatTransformer();
555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
Feature: Component - Test Component Composition and Questionnaire Data

  Background: Init
    Given I want to create a VLM

  Scenario: Test Component Composition and Questionnaire Data After Same Heat Reupload
    When I want to create a VSP with onboarding type "NetworkPackage"
    Then I want to make sure this Item has status "Draft"

    When I want to upload a NetworkPackage for this VSP from path "resources/uploads/vMME_Ericsson_small_v2.zip"
    And I want to process the NetworkPackage file for this VSP

    When I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}/components"
    Then I want to copy to property "componentId" from response data path "results[0].id"
    Then I want to check property "listCount" for value 4
    Then I want to check property "results[0].id" exists

    #Verify composition data for first component
    When I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}/components/{componentId}"
    Then I want to check property "data.name" exists
    Then I want to check property "data.displayName" exists
    Then I want to copy to property "firstCompDisplayName" from response data path "data.displayName"
    #Ensure composition data does not have vfcCode and nfcFunction since they are moved to questionnaire
    Then I want to check property "data.vfcCode" does not exist
    Then I want to check property "data.nfcFunction" does not exist

    When I want to get the questionnaire for this component
    #Ensure questionnaire data has nfcNamingCode in "general" and populated with value of component displayName
    Then I want to check value of "general.nfcNamingCode" in the questionnaire data with value of property "firstCompDisplayName"

    #Update questionnaire nfcNamingCode and nfcFunction in "general"
    And I want to update this questionnaire with value "general/nfcNamingCode" for property "test_update_naming_code"
    And I want to update this questionnaire with value "general/nfcFunction" for property "test_function"
    And I want to update this questionnaire

    #Retrive questionnaire and verify nfcNamingCode and nfcFunction in "general" has updated value
    When I want to get the questionnaire for this component
    Then I want to check this questionnaire has value "general/nfcNamingCode" for property "test_update_naming_code"
    Then I want to check this questionnaire has value "general/nfcFunction" for property "test_function"

    #Reupload the same Heat
    When I want to upload a NetworkPackage for this VSP from path "resources/uploads/vMME_Ericsson_small_v2.zip"
    And I want to process the NetworkPackage file for this VSP

    When I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}/components"
    #Find component id for which nfcNamingCode and nfcFunction were set in previous HEAT based on component display name
    Then I want to set componentId for component name in property "firstCompDisplayName"

    #Retrive questionnaire and verify nfcNamingCode and nfcFunction in "general" has retained values that were before heat upload
    When I want to get the questionnaire for this component
    Then I want to check this questionnaire has value "general/nfcNamingCode" for property "test_update_naming_code"
    Then I want to check this questionnaire has value "general/nfcFunction" for property "test_function"