aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test/java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2017-10-11 11:49:51 -0400
committerJim Hahn <jrh3@att.com>2017-10-11 11:49:51 -0400
commit015b92c3d96fb42f80b018fdf8f639f1cf3298c3 (patch)
treef96f2e944d456809702041bc9f9ef653ba061216 /bpmn/MSOCommonBPMN/src/test/java
parentf86960874497f005079c9e595b5e9e2eb0a815d1 (diff)
Add junit test coverage and fix bugs in VCPE
Added additional junit tests for VCPE and fixed bugs that were found while testing. Change-Id: Icb6a0c936a16b775ff553c11cb07a4348bd9ebfc Issue-ID: SO-210 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test/java')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java
index 9057904da3..f60d984a6d 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java
@@ -21,6 +21,9 @@
package org.openecomp.mso.bpmn.common;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.doAnswer;
@@ -77,7 +80,18 @@ public class BPMNUtil {
.getValue();
return (T) responseData;
}
+
+
+ public static void assertAnyProcessInstanceFinished(ProcessEngineServices processEngineServices, String processDefinitionID) {
+ String pID = getProcessInstanceId(processEngineServices,
+ processDefinitionID);
+ assertNotNull(pID);
+ assertTrue(processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pID).finished().count() > 0);
+ }
+ public static void assertNoProcessInstance(ProcessEngineServices processEngineServices, String processDefinitionID) {
+ assertNull(getProcessInstanceId(processEngineServices, processDefinitionID));
+ }
public static void assertProcessInstanceFinished(ProcessEngineServices processEngineServices, String pid) {
assertEquals(1, processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pid).finished().count());
bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* 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 */ }
{
  "service": {
    "uuid": "76f27dfe-33e5-472f-8e0b-acf524adc4f0",
    "invariantUuid": "c3618e16-bb5b-433a-a6e0-565ca79d8b65",
    "name": "MSO_Example_Service",
    "version": "1.0",
    "toscaModelURL": null,
    "category": "Network L4+",
    "serviceType": "",
    "serviceRole": "",
    "description": "MSO_Example_Service",
    "serviceEcompNaming": "true",
    "instantiationType": "ClientConfig",
    "inputs": {

    }
  },
  "vnfs": {

  },
  "networks": {

  },
  "collectionResource": {
    "MSO_Example 0": {
      "uuid": "4f8068d9-fb13-49fc-9e39-634d2094b659",
      "invariantUuid": "2fc1b3b8-b8ed-413e-add8-3d903cf2b458",
      "description": "MSO_Example",
      "name": "MSO_Example",
      "version": "0.2",
      "customizationUuid": "fffc356d-9e95-4d9c-aa64-7273f33aae84",
      "inputs": null,
      "commands": {

      },
      "properties": {
        "MSO_Example..NetworkCollection..0_network_collection_function": "fffff",
        "MSO_Example..NetworkCollection..0_network_collection_description": "ddd",
        "MSO_Example..Fixed..0_quantity": "89",
        "ecomp_generated_naming": "false"
      },
      "type": "CR",
      "category": "Network L2-3",
      "subcategory": "Infrastructure",
      "resourceVendor": "cisco",
      "customizationUUID": "fffc356d-9e95-4d9c-aa64-7273f33aae84",
      "resourceVendorRelease": "1.0",
      "resourceVendorModelNumber": "",
      "networksCollection": {
        "MSO_Example..NetworkCollection..0": {
          "uuid": "f4cb3cb6-a45d-474d-9af8-f4ae2e733ef7",
          "invariantUuid": "f3cf3727-f779-4721-b989-851722c64ca4",
          "name": "MSO_Example..NetworkCollection..0",
          "version": "1",
          "networkCollectionProperties": {
            "networkCollectionFunction": "fffff",
            "networkCollectionDescription": "ddd"
          }
        }
      }
    }
  },
  "configurations": {

  },
  "serviceProxies": {

  },
  "vfModules": {

  },
  "volumeGroups": {

  },
  "pnfs": {

  },
  "vnfGroups": {}
}