summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN
diff options
context:
space:
mode:
authorAS00465059 <AS00465059@techmahindra.com>2018-03-20 12:35:19 +0530
committerAS00465059 <AS00465059@techmahindra.com>2018-03-20 12:35:19 +0530
commit54500b8f98f9fe7308e85c4d62b1069cf7f17870 (patch)
tree0392bfd133bab0e4cc67718cdc015e5c1a8e710e /bpmn/MSOCommonBPMN
parent6d624f550e6c075c9accdd52c9e47f7f34994eea (diff)
Adding Junit
Adding Junit for: 1.BpmnParam.java 2.BpmnRestClient.java 3.ResourceInput.java 4.ResourceRecipeRequest.java Sonar link: https://sonar.onap.org/code?id=org.onap.so%3Aso&selected=org.onap.so%3AMSOCommonBPMN%3Asrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fmso%2Fbpmn%2Fcommon%2Frecipe Change-Id: Icb2c545cb62a49fdd84ce998aa43792436aeaf41 Issue-ID: SO-491 Signed-off-by: AS00465059 <AS00465059@techmahindra.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/BpmnParamTest.java41
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClientTest.java33
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceInputTest.java60
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequestTest.java51
4 files changed, 185 insertions, 0 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/BpmnParamTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/BpmnParamTest.java
new file mode 100644
index 0000000000..166e3d78c1
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/BpmnParamTest.java
@@ -0,0 +1,41 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* ============LICENSE_END=========================================================
+*/
+
+package org.openecomp.mso.bpmn.common.recipe;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class BpmnParamTest {
+
+ BpmnParam bp=new BpmnParam();
+
+ @Test
+ public void test() {
+ bp.setValue("testdata");
+ assertEquals(bp.getValue(),"testdata");
+ }
+ @Test
+ public void testToString(){
+ assert(bp.toString()!=null);
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClientTest.java
new file mode 100644
index 0000000000..89f538b085
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClientTest.java
@@ -0,0 +1,33 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* ============LICENSE_END=========================================================
+*/
+package org.openecomp.mso.bpmn.common.recipe;
+
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+public class BpmnRestClientTest {
+
+ @Test
+ public void test() {
+ BpmnRestClient.getEncryptedPropValue("prop", "123", "456");
+ BpmnRestClient.loadMsoProperties();
+ assertEquals(true,BpmnRestClient.getNoPropertiesState());
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceInputTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceInputTest.java
new file mode 100644
index 0000000000..fe1975faf9
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceInputTest.java
@@ -0,0 +1,60 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* ============LICENSE_END=========================================================
+*/
+package org.openecomp.mso.bpmn.common.recipe;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class ResourceInputTest {
+
+ ResourceInput ri=new ResourceInput();
+ @Test
+ public void test() {
+ ri.setResourceInstanceName("resourceInstanceName");
+ ri.setResourceInstanceDes("resourceInstanceDes");
+ ri.setGlobalSubscriberId("globalSubscriberId");
+ ri.setServiceType("serviceType");
+ ri.setServiceInstanceId("serviceId");
+ ri.setOperationId("operationId");
+ ri.setResourceInvariantUuid("resourceInvariantUuid");
+ ri.setResourceUuid("resourceUuid");
+ ri.setResourceCustomizationUuid("resourceCustomizationUuid");
+ ri.setResourceInstancenUuid("resourceInstancenUuid");
+ ri.setResourceParameters("resourceParameters");
+ ri.setOperationType("operationType");
+ assertEquals(ri.getResourceInstanceName(), "resourceInstanceName");
+ assertEquals(ri.getResourceInstanceDes(), "resourceInstanceDes");
+ assertEquals(ri.getGlobalSubscriberId(), "globalSubscriberId");
+ assertEquals(ri.getServiceType(), "serviceType");
+ assertEquals(ri.getServiceInstanceId(), "serviceId");
+ assertEquals(ri.getOperationId(), "operationId");
+ assertEquals(ri.getResourceInvariantUuid(), "resourceInvariantUuid");
+ assertEquals(ri.getResourceUuid(), "resourceUuid");
+ assertEquals(ri.getResourceCustomizationUuid(), "resourceCustomizationUuid");
+ assertEquals(ri.getResourceInstancenUuid(), "resourceInstancenUuid");
+ assertEquals(ri.getResourceParameters(), "resourceParameters");
+ assertEquals(ri.getOperationType(), "operationType");
+ }
+ @Test
+ public void testToString(){
+ assert(ri.toString()!=null);
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequestTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequestTest.java
new file mode 100644
index 0000000000..3b185bae22
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequestTest.java
@@ -0,0 +1,51 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* ============LICENSE_END=========================================================
+*/
+package org.openecomp.mso.bpmn.common.recipe;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class ResourceRecipeRequestTest {
+
+ ResourceRecipeRequest rr=new ResourceRecipeRequest();
+ BpmnParam bp=new BpmnParam();
+ @Test
+ public void test() {
+ rr.setResourceInput(bp);
+ rr.setHost(bp);
+ rr.setRequestId(bp);
+ rr.setRequestAction(bp);
+ rr.setServiceInstanceId(bp);
+ rr.setServiceType(bp);
+ rr.setRecipeParams(bp);
+ assertEquals(rr.getResourceInput(),bp);
+ assertEquals(rr.getHost(),bp);
+ assertEquals(rr.getRequestId(),bp);
+ assertEquals(rr.getRequestAction(),bp);
+ assertEquals(rr.getServiceInstanceId(),bp);
+ assertEquals(rr.getServiceType(),bp);
+ assertEquals(rr.getRecipeParams(),bp);
+ }
+ @Test
+ public void testToString(){
+ assert(rr.toString()!=null);
+ }
+}