50f7ac65dab258c52dbbe5bb32e4b95fbe37662b
[appc.git] / appc-inbound / appc-design-services / provider / src / test / java / org / onap / appc / design / validator / TestDesigndata.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2017-2018 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  * ============LICENSE_END=========================================================
22  */
23
24 package org.onap.appc.design.validator;
25
26 import java.util.ArrayList;
27 import java.util.List;
28 import org.junit.Test;
29 import org.onap.appc.design.data.ArtifactInfo;
30 import org.onap.appc.design.data.DesignInfo;
31 import org.onap.appc.design.data.DesignRequest;
32 import org.onap.appc.design.data.DesignResponse;
33 import org.onap.appc.design.data.StatusInfo;
34
35 public class TestDesigndata {
36
37     DesignResponse dr = new DesignResponse();
38
39     @Test
40     public void testSetUserID() {
41         dr.setUserId("00000");
42         dr.getUserId();
43     }
44
45     @Test
46     public void testSetDesignInfoList() {
47         DesignInfo di = new DesignInfo();
48         List<DesignInfo> li = new ArrayList<DesignInfo>();
49         di.setAction("TestAction");
50         di.setArtifact_name("TestName");
51         di.setArtifact_type("TestType");
52         di.setInCart("TestCart");
53         di.setProtocol("TestProtocol");
54         di.setVnf_type("TestVNF");
55         di.setVnfc_type("TestVNFC");
56         li.add(di);
57         dr.setDesignInfoList(li);
58     }
59
60     @Test
61     public void testSetArtifactInfo() {
62         ArtifactInfo ai = new ArtifactInfo();
63         List<ArtifactInfo> li = new ArrayList<ArtifactInfo>();
64         ai.setArtifact_content("TestContent");
65         li.add(ai);
66         dr.setArtifactInfo(li);
67     }
68
69     @Test
70     public void testStatusInfo() {
71         StatusInfo si = new StatusInfo();
72         List<StatusInfo> li = new ArrayList<StatusInfo>();
73         si.setAction("TestAction");
74         si.setAction_status("TestActionStatus");
75         si.setArtifact_status("TestArtifactStatus");
76         si.setVnf_type("TestVNF");
77         si.setVnfc_type("TestVNFC");
78         li.add(si);
79         dr.setStatusInfoList(li);
80     }
81
82     @Test
83     public void testDesignRequest() {
84         DesignRequest dreq = new DesignRequest();
85         dreq.setAction("TestAction");
86         dreq.setArtifact_contents("TestContent");
87         dreq.setArtifact_name("TestName");
88         dreq.setProtocol("TestProtocol");
89         dreq.setUserId("0000");
90         dreq.setVnf_type("testvnf");
91         dreq.setVnfc_type("testvnfc");
92         dreq.getAction();
93         dreq.getArtifact_contents();
94         dreq.getArtifact_name();
95         dreq.getProtocol();
96         dreq.getUserId();
97         dreq.getVnf_type();
98         dreq.getVnfc_type();
99         dreq.toString();
100     }
101 }