blob: 4ab05f363ab8eb1ef69b85f2c9c883d7685198b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
/*-
* ============LICENSE_START=======================================================
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
*/
package org.onap.so.db.catalog.beans;
import static org.junit.Assert.assertTrue;
import java.util.HashSet;
import java.util.Set;
import org.junit.Test;
public class CvnfcCustomizationTest {
private static final Integer ID = new Integer(1);
private static final String DESCRIPTION = "testDescription";
private static final String MODEL_CUSTOMIZATION_UUID = "testModelCustomizationUUID";
private static final String MODEL_INSTANCE_NAME = "testModelInstanceName";
private static final String MODEL_INVARIANT_UUID = "testModelInvariantUUID";
private static final String MODEL_NAME = "testModelName";
private static final String MODEL_UUID = "testModelUUID";
private static final String MODEL_VERSION = "testModelVersion";
private static final String TOSCA_NODE_TYPE = "testToscaNodeType";
private static final String NFC_FUNCTION = "testNfcFunction";
private static final String NFC_NAMING_CODE = "testNfcNamingCode";
@Test
public final void testCvnfcCustomization () {
CvnfcCustomization cvnfcCustomization = new CvnfcCustomization();
cvnfcCustomization.setDescription(DESCRIPTION);
cvnfcCustomization.setId(ID);
cvnfcCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
cvnfcCustomization.setModelInstanceName(MODEL_INSTANCE_NAME);
cvnfcCustomization.setModelInvariantUUID(MODEL_INVARIANT_UUID);
cvnfcCustomization.setModelName(MODEL_NAME);
cvnfcCustomization.setModelUUID(MODEL_UUID);
cvnfcCustomization.setModelVersion(MODEL_VERSION);
cvnfcCustomization.setNfcFunction(NFC_FUNCTION);
cvnfcCustomization.setNfcNamingCode(NFC_NAMING_CODE);
cvnfcCustomization.setToscaNodeType(TOSCA_NODE_TYPE);
cvnfcCustomization.setVfModuleCustomization(setupVfModuleCustomization());
Set<CvnfcConfigurationCustomization> cvnfcConfigurationCustomizationSet = new HashSet();
cvnfcConfigurationCustomizationSet.add(setupCvnfcConfigurationCustomization());
cvnfcCustomization.setCvnfcConfigurationCustomization(cvnfcConfigurationCustomizationSet);
assertTrue (cvnfcCustomization.getId().equals (new Integer(1)));
assertTrue (cvnfcCustomization.getDescription().equals (DESCRIPTION));
assertTrue (cvnfcCustomization.getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
assertTrue (cvnfcCustomization.getModelInstanceName().equals (MODEL_INSTANCE_NAME));
assertTrue (cvnfcCustomization.getModelInvariantUUID().equals (MODEL_INVARIANT_UUID));
assertTrue (cvnfcCustomization.getModelName().equals (MODEL_NAME));
assertTrue (cvnfcCustomization.getModelUUID().equals (MODEL_UUID));
assertTrue (cvnfcCustomization.getModelVersion().equals (MODEL_VERSION));
assertTrue (cvnfcCustomization.getNfcFunction().equals (NFC_FUNCTION));
assertTrue (cvnfcCustomization.getNfcNamingCode().equals (NFC_NAMING_CODE));
assertTrue (cvnfcCustomization.getToscaNodeType().equals (TOSCA_NODE_TYPE));
assertTrue (cvnfcCustomization.getVfModuleCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
}
private VfModuleCustomization setupVfModuleCustomization(){
VfModuleCustomization vfModuleCustomization = new VfModuleCustomization();
vfModuleCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
return vfModuleCustomization;
}
private CvnfcConfigurationCustomization setupCvnfcConfigurationCustomization(){
CvnfcConfigurationCustomization cvnfcConfigurationCustomization = new CvnfcConfigurationCustomization();
cvnfcConfigurationCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
return cvnfcConfigurationCustomization;
}
}
|