Merge "Reorder modifiers"
[so.git] / mso-catalog-db / src / test / java / org / openecomp / mso / db / catalog / test / ModelTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.mso.db.catalog.test;
22
23 import static org.junit.Assert.assertTrue;
24
25 import java.sql.Timestamp;
26
27 import org.junit.Test;
28 import org.openecomp.mso.db.catalog.beans.Model;
29
30 /**
31  */
32
33 public class ModelTest {
34
35         @Test
36         public final void modelDataTest() {
37                 Model model = new Model();
38                 model.setId(1);
39                 assertTrue(model.getId() == 1);
40
41                 model.setCreated(new Timestamp(System.currentTimeMillis()));
42                 assertTrue(model.getCreated() != null);
43                 model.setModelCustomizationId("modelCustomizationId");
44
45                 assertTrue(model.getModelCustomizationId().equalsIgnoreCase("modelCustomizationId"));
46                 model.setModelCustomizationName("modelCustomizationName");
47                 assertTrue(model.getModelCustomizationName().equalsIgnoreCase("modelCustomizationName"));
48
49                 model.setModelInvariantId("modelInvariantId");
50                 assertTrue(model.getModelInvariantId().equalsIgnoreCase("modelInvariantId"));
51                 model.setModelName("modelName");
52                 assertTrue(model.getModelName().equalsIgnoreCase("modelName"));
53
54                 model.setModelType("modelType");
55                 assertTrue(model.getModelType().equalsIgnoreCase("modelType"));
56                 model.setModelVersion("modelVersion");
57                 assertTrue(model.getModelVersion().equalsIgnoreCase("modelVersion"));
58                 model.setModelVersionId("modelVersionId");
59                 assertTrue(model.getModelVersionId().equalsIgnoreCase("modelVersionId"));
60                 model.setVersion("1");
61                 assertTrue(model.getVersion().equalsIgnoreCase("1"));
62                 model.setRecipes(null);
63
64                 assertTrue(model.getRecipes() == null);
65 //              assertTrue(model.toString() != null);
66
67         }
68
69 }