2 * ============LICENSE_START=======================================================
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
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 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 * ============LICENSE_END=========================================================
25 package org.openecomp.appc.design.validator;
27 import java.util.ArrayList;
28 import java.util.List;
29 import org.junit.Test;
30 import org.openecomp.appc.design.data.ArtifactInfo;
31 import org.openecomp.appc.design.data.DesignInfo;
32 import org.openecomp.appc.design.data.DesignRequest;
33 import org.openecomp.appc.design.data.DesignResponse;
34 import org.openecomp.appc.design.data.StatusInfo;
36 public class TestDesigndata {
38 DesignResponse dr = new DesignResponse();
41 public void testSetUserID() {
42 dr.setUserId("00000");
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");
58 dr.setDesignInfoList(li);
62 public void testSetArtifactInfo() {
63 ArtifactInfo ai = new ArtifactInfo();
64 List<ArtifactInfo> li = new ArrayList<ArtifactInfo>();
65 ai.setArtifact_content("TestContent");
67 dr.setArtifactInfo(li);
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");
80 dr.setStatusInfoList(li);
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");
94 dreq.getArtifact_contents();
95 dreq.getArtifact_name();