diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2018-03-20 09:01:39 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-03-20 09:01:39 +0000 |
commit | 9009032c5f823778ce105c11f0a131bd6ae64171 (patch) | |
tree | 73a17ac87a58914caeee6a2eb7e9d4ec54234a6b /bpmn | |
parent | 8b06b9ceb99934c7c1cd6500ac3fcc55d2b03e83 (diff) | |
parent | 54500b8f98f9fe7308e85c4d62b1069cf7f17870 (diff) |
Merge "Adding Junit"
Diffstat (limited to 'bpmn')
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); + } +} |