1 package org.onap.vid.model;
6 import org.onap.vid.asdc.beans.tosca.ToscaModel;
7 import org.onap.vid.model.Service;
9 import org.junit.Assert;
11 public class ServiceModelTest {
13 private ServiceModel createTestSubject() {
14 return new ServiceModel();
18 public void testGetService() throws Exception {
19 ServiceModel testSubject;
23 testSubject = createTestSubject();
24 result = testSubject.getService();
28 public void testGetVnfs() throws Exception {
29 ServiceModel testSubject;
30 Map<String, VNF> result;
33 testSubject = createTestSubject();
34 result = testSubject.getVnfs();
38 public void testGetNetworks() throws Exception {
39 ServiceModel testSubject;
40 Map<String, Network> result;
43 testSubject = createTestSubject();
44 result = testSubject.getNetworks();
48 public void testSetService() throws Exception {
49 ServiceModel testSubject;
50 Service service = null;
53 testSubject = createTestSubject();
54 testSubject.setService(service);
58 public void testSetVnfs() throws Exception {
59 ServiceModel testSubject;
60 Map<String, VNF> vnfs = null;
63 testSubject = createTestSubject();
64 testSubject.setVnfs(vnfs);
68 public void testSetNetworks() throws Exception {
69 ServiceModel testSubject;
70 Map<String, Network> networks = null;
73 testSubject = createTestSubject();
74 testSubject.setNetworks(networks);
78 public void testGetVfModules() throws Exception {
79 ServiceModel testSubject;
80 Map<String, VfModule> result;
83 testSubject = createTestSubject();
84 result = testSubject.getVfModules();
88 public void testGetVolumeGroups() throws Exception {
89 ServiceModel testSubject;
90 Map<String, VolumeGroup> result;
93 testSubject = createTestSubject();
94 result = testSubject.getVolumeGroups();
98 public void testSetVfModules() throws Exception {
99 ServiceModel testSubject;
100 Map<String, VfModule> vfModules = null;
103 testSubject = createTestSubject();
104 testSubject.setVfModules(vfModules);
108 public void testSetVolumeGroups() throws Exception {
109 ServiceModel testSubject;
110 Map<String, VolumeGroup> volumeGroups = null;
113 testSubject = createTestSubject();
114 testSubject.setVolumeGroups(volumeGroups);
118 public void testAssociateGroups() throws Exception {
119 ServiceModel testSubject;
122 testSubject = createTestSubject();
123 testSubject.associateGroups();
127 public void testSetServiceProxies() throws Exception {
128 ServiceModel testSubject;
129 Map<String, ServiceProxy> serviceProxies = null;
133 testSubject = createTestSubject();
134 testSubject.setServiceProxies(serviceProxies);
135 } catch (Exception e) {
140 public void testSetPnfs() throws Exception {
141 ServiceModel testSubject;
142 Map<String, Node> pnfs = null;
146 testSubject = createTestSubject();
147 testSubject.setPnfs(pnfs);
148 } catch (Exception e) {
153 public void testSetConfigurations() throws Exception {
154 ServiceModel testSubject;
155 Map<String, PortMirroringConfig> configurations = null;
159 testSubject = createTestSubject();
160 testSubject.setConfigurations(configurations);
161 } catch (Exception e) {
166 public void testGetServiceProxies() throws Exception {
167 ServiceModel testSubject;
168 Map<String, ServiceProxy> result;
172 testSubject = createTestSubject();
173 result = testSubject.getServiceProxies();
174 } catch (Exception e) {
179 public void testGetPnfs() throws Exception {
180 ServiceModel testSubject;
181 Map<String, Node> result;
185 testSubject = createTestSubject();
186 result = testSubject.getPnfs();
187 } catch (Exception e) {
192 public void testGetConfigurations() throws Exception {
193 ServiceModel testSubject;
194 Map<String, PortMirroringConfig> result;
198 testSubject = createTestSubject();
199 result = testSubject.getConfigurations();
200 } catch (Exception e) {
205 public void testExtractService() throws Exception {
206 ToscaModel serviceToscaModel = null;
207 org.onap.vid.asdc.beans.Service asdcServiceMetadata = null;
212 result = ServiceModel.extractService(serviceToscaModel, asdcServiceMetadata);
213 } catch (Exception e) {
218 public void testExtractGroups() throws Exception {
219 ToscaModel serviceToscaModel = null;
220 ServiceModel serviceModel = null;
224 ServiceModel.extractGroups(serviceToscaModel, serviceModel);
225 } catch (Exception e) {