70191311b2190cba1b28e455a93a34abbeca983d
[so.git] / bpmn / MSOCommonBPMN / src / test / java / org / onap / so / bpmn / common / recipe / ResourceInputTest.java
1 /*
2 * ============LICENSE_START=======================================================
3  * ONAP : SO
4  * ================================================================================
5  * Copyright (C) 2018 TechMahindra
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19 */
20 package org.onap.so.bpmn.common.recipe;
21
22 import static org.junit.Assert.assertEquals;
23
24 import org.junit.Test;
25 import org.onap.so.BaseTest;
26 import org.onap.so.bpmn.core.domain.ModelInfo;
27
28 public class ResourceInputTest extends BaseTest{
29    
30         ResourceInput ri=new ResourceInput();
31         @Test
32         public void test() {
33                 ri.setResourceInstanceName("resourceInstanceName");
34                 ri.setResourceInstanceDes("resourceInstanceDes");
35                 ri.setGlobalSubscriberId("globalSubscriberId");
36                 ri.setServiceType("serviceType");
37                 ri.setServiceInstanceId("serviceId");
38                 ri.setOperationId("operationId");
39                 ModelInfo serviceModelInfo = new ModelInfo();
40                 serviceModelInfo.setModelCustomizationUuid("modelCustomizationUuid");
41                 serviceModelInfo.setModelInvariantUuid("modelInvariantUuid");
42                 serviceModelInfo.setModelUuid("modelUuid");
43                 ri.setServiceModelInfo(serviceModelInfo);
44         ModelInfo resourceModelInfo = new ModelInfo();
45         resourceModelInfo.setModelCustomizationUuid("modelCustomizationUuid");
46         resourceModelInfo.setModelInvariantUuid("modelInvariantUuid");
47         resourceModelInfo.setModelUuid("modelUuid");
48         ri.setResourceModelInfo(resourceModelInfo);
49                 ri.setResourceInstancenUuid("resourceInstancenUuid");
50                 ri.setResourceParameters("resourceParameters");
51                 ri.setOperationType("operationType");
52                 assertEquals(ri.getResourceInstanceName(), "resourceInstanceName");
53                 assertEquals(ri.getResourceInstanceDes(), "resourceInstanceDes");
54                 assertEquals(ri.getGlobalSubscriberId(), "globalSubscriberId");
55                 assertEquals(ri.getServiceType(), "serviceType");
56                 assertEquals(ri.getServiceInstanceId(), "serviceId");
57                 assertEquals(ri.getOperationId(), "operationId");
58                 assertEquals(ri.getResourceInstancenUuid(), "resourceInstancenUuid");
59                 assertEquals(ri.getResourceParameters(), "resourceParameters");
60                 assertEquals(ri.getOperationType(), "operationType");
61                 }
62         @Test
63         public void testToString(){
64                 assert(ri.toString()!=null);
65         }
66 }