Unit tests
[vid.git] / vid-app-common / src / test / java / org / onap / vid / model / ServiceModelTest.java
1 package org.onap.vid.model;
2
3 import java.util.Map;
4
5 import org.junit.Test;
6 import org.onap.vid.asdc.beans.tosca.ToscaModel;
7 import org.onap.vid.model.Service;
8 import java.util.*;
9 import org.junit.Assert;
10
11 public class ServiceModelTest {
12
13     private ServiceModel createTestSubject() {
14         return new ServiceModel();
15     }
16
17     @Test
18     public void testGetService() throws Exception {
19         ServiceModel testSubject;
20         Service result;
21
22         // default test
23         testSubject = createTestSubject();
24         result = testSubject.getService();
25     }
26
27     @Test
28     public void testGetVnfs() throws Exception {
29         ServiceModel testSubject;
30         Map<String, VNF> result;
31
32         // default test
33         testSubject = createTestSubject();
34         result = testSubject.getVnfs();
35     }
36
37     @Test
38     public void testGetNetworks() throws Exception {
39         ServiceModel testSubject;
40         Map<String, Network> result;
41
42         // default test
43         testSubject = createTestSubject();
44         result = testSubject.getNetworks();
45     }
46
47     @Test
48     public void testSetService() throws Exception {
49         ServiceModel testSubject;
50         Service service = null;
51
52         // default test
53         testSubject = createTestSubject();
54         testSubject.setService(service);
55     }
56
57     @Test
58     public void testSetVnfs() throws Exception {
59         ServiceModel testSubject;
60         Map<String, VNF> vnfs = null;
61
62         // default test
63         testSubject = createTestSubject();
64         testSubject.setVnfs(vnfs);
65     }
66
67     @Test
68     public void testSetNetworks() throws Exception {
69         ServiceModel testSubject;
70         Map<String, Network> networks = null;
71
72         // default test
73         testSubject = createTestSubject();
74         testSubject.setNetworks(networks);
75     }
76
77     @Test
78     public void testGetVfModules() throws Exception {
79         ServiceModel testSubject;
80         Map<String, VfModule> result;
81
82         // default test
83         testSubject = createTestSubject();
84         result = testSubject.getVfModules();
85     }
86
87     @Test
88     public void testGetVolumeGroups() throws Exception {
89         ServiceModel testSubject;
90         Map<String, VolumeGroup> result;
91
92         // default test
93         testSubject = createTestSubject();
94         result = testSubject.getVolumeGroups();
95     }
96
97     @Test
98     public void testSetVfModules() throws Exception {
99         ServiceModel testSubject;
100         Map<String, VfModule> vfModules = null;
101
102         // default test
103         testSubject = createTestSubject();
104         testSubject.setVfModules(vfModules);
105     }
106
107     @Test
108     public void testSetVolumeGroups() throws Exception {
109         ServiceModel testSubject;
110         Map<String, VolumeGroup> volumeGroups = null;
111
112         // default test
113         testSubject = createTestSubject();
114         testSubject.setVolumeGroups(volumeGroups);
115     }
116
117     @Test
118     public void testAssociateGroups() throws Exception {
119         ServiceModel testSubject;
120
121         // default test
122         testSubject = createTestSubject();
123         testSubject.associateGroups();
124     }
125
126     @Test
127     public void testSetServiceProxies() throws Exception {
128         ServiceModel testSubject;
129         Map<String, ServiceProxy> serviceProxies = null;
130
131         // default test
132         try {
133             testSubject = createTestSubject();
134             testSubject.setServiceProxies(serviceProxies);
135         } catch (Exception e) {
136         }
137     }
138
139     @Test
140     public void testSetPnfs() throws Exception {
141         ServiceModel testSubject;
142         Map<String, Node> pnfs = null;
143
144         // default test
145         try {
146             testSubject = createTestSubject();
147             testSubject.setPnfs(pnfs);
148         } catch (Exception e) {
149         }
150     }
151
152     @Test
153     public void testSetConfigurations() throws Exception {
154         ServiceModel testSubject;
155         Map<String, PortMirroringConfig> configurations = null;
156
157         // default test
158         try {
159             testSubject = createTestSubject();
160             testSubject.setConfigurations(configurations);
161         } catch (Exception e) {
162         }
163     }
164
165     @Test
166     public void testGetServiceProxies() throws Exception {
167         ServiceModel testSubject;
168         Map<String, ServiceProxy> result;
169
170         // default test
171         try {
172             testSubject = createTestSubject();
173             result = testSubject.getServiceProxies();
174         } catch (Exception e) {
175         }
176     }
177
178     @Test
179     public void testGetPnfs() throws Exception {
180         ServiceModel testSubject;
181         Map<String, Node> result;
182
183         // default test
184         try {
185             testSubject = createTestSubject();
186             result = testSubject.getPnfs();
187         } catch (Exception e) {
188         }
189     }
190
191     @Test
192     public void testGetConfigurations() throws Exception {
193         ServiceModel testSubject;
194         Map<String, PortMirroringConfig> result;
195
196         // default test
197         try {
198             testSubject = createTestSubject();
199             result = testSubject.getConfigurations();
200         } catch (Exception e) {
201         }
202     }
203
204     @Test
205     public void testExtractService() throws Exception {
206         ToscaModel serviceToscaModel = null;
207         org.onap.vid.asdc.beans.Service asdcServiceMetadata = null;
208         Service result;
209
210         // default test
211         try {
212             result = ServiceModel.extractService(serviceToscaModel, asdcServiceMetadata);
213         } catch (Exception e) {
214         }
215     }
216
217     @Test
218     public void testExtractGroups() throws Exception {
219         ToscaModel serviceToscaModel = null;
220         ServiceModel serviceModel = null;
221
222         // default test
223         try {
224             ServiceModel.extractGroups(serviceToscaModel, serviceModel);
225         } catch (Exception e) {
226         }
227     }
228 }