First part of onap rename
[appc.git] / appc-inbound / appc-design-services / provider / src / test / java / org / openecomp / appc / design / validator / TestDesigndata.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Copyright (C) 2017 Amdocs
8  * =============================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  * 
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  * 
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * 
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  * ============LICENSE_END=========================================================
23  */
24
25 package org.onap.appc.design.validator;
26
27 import java.util.ArrayList;
28 import java.util.List;
29 import org.junit.Test;
30 import org.onap.appc.design.data.ArtifactInfo;
31 import org.onap.appc.design.data.DesignInfo;
32 import org.onap.appc.design.data.DesignRequest;
33 import org.onap.appc.design.data.DesignResponse;
34 import org.onap.appc.design.data.StatusInfo;
35
36 public class TestDesigndata {
37
38     DesignResponse dr = new DesignResponse();
39
40     @Test
41     public void testSetUserID() {
42         dr.setUserId("00000");
43         dr.getUserId();
44     }
45
46     @Test
47     public void testSetDesignInfoList() {
48         DesignInfo di = new DesignInfo();
49         List<DesignInfo> li = new ArrayList<DesignInfo>();
50         di.setAction("TestAction");
51         di.setArtifact_name("TestName");
52         di.setArtifact_type("TestType");
53         di.setInCart("TestCart");
54         di.setProtocol("TestProtocol");
55         di.setVnf_type("TestVNF");
56         di.setVnfc_type("TestVNFC");
57         li.add(di);
58         dr.setDesignInfoList(li);
59     }
60
61     @Test
62     public void testSetArtifactInfo() {
63         ArtifactInfo ai = new ArtifactInfo();
64         List<ArtifactInfo> li = new ArrayList<ArtifactInfo>();
65         ai.setArtifact_content("TestContent");
66         li.add(ai);
67         dr.setArtifactInfo(li);
68     }
69
70     @Test
71     public void testStatusInfo() {
72         StatusInfo si = new StatusInfo();
73         List<StatusInfo> li = new ArrayList<StatusInfo>();
74         si.setAction("TestAction");
75         si.setAction_status("TestActionStatus");
76         si.setArtifact_status("TestArtifactStatus");
77         si.setVnf_type("TestVNF");
78         si.setVnfc_type("TestVNFC");
79         li.add(si);
80         dr.setStatusInfoList(li);
81     }
82
83     @Test
84     public void testDesignRequest() {
85         DesignRequest dreq = new DesignRequest();
86         dreq.setAction("TestAction");
87         dreq.setArtifact_contents("TestContent");
88         dreq.setArtifact_name("TestName");
89         dreq.setProtocol("TestProtocol");
90         dreq.setUserId("0000");
91         dreq.setVnf_type("testvnf");
92         dreq.setVnfc_type("testvnfc");
93         dreq.getAction();
94         dreq.getArtifact_contents();
95         dreq.getArtifact_name();
96         dreq.getProtocol();
97         dreq.getUserId();
98         dreq.getVnf_type();
99         dreq.getVnfc_type();
100         dreq.toString();
101     }
102 }