2 * ============LICENSE_START=======================================================
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 * ============LICENSE_END=========================================================
24 package org.onap.appc.design.validator;
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;
35 public class TestDesigndata {
37 DesignResponse dr = new DesignResponse();
40 public void testSetUserID() {
41 dr.setUserId("00000");
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");
57 dr.setDesignInfoList(li);
61 public void testSetArtifactInfo() {
62 ArtifactInfo ai = new ArtifactInfo();
63 List<ArtifactInfo> li = new ArrayList<ArtifactInfo>();
64 ai.setArtifact_content("TestContent");
66 dr.setArtifactInfo(li);
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");
79 dr.setStatusInfoList(li);
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");
93 dreq.getArtifact_contents();
94 dreq.getArtifact_name();