2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.mso.db.catalog.test;
23 import static org.junit.Assert.assertTrue;
25 import java.sql.Timestamp;
27 import org.junit.Test;
28 import org.openecomp.mso.db.catalog.beans.Model;
33 public class ModelTest {
36 public final void modelDataTest() {
37 Model model = new Model();
39 assertTrue(model.getId() == 1);
41 model.setCreated(new Timestamp(System.currentTimeMillis()));
42 assertTrue(model.getCreated() != null);
43 model.setModelCustomizationId("modelCustomizationId");
45 assertTrue(model.getModelCustomizationId().equalsIgnoreCase("modelCustomizationId"));
46 model.setModelCustomizationName("modelCustomizationName");
47 assertTrue(model.getModelCustomizationName().equalsIgnoreCase("modelCustomizationName"));
49 model.setModelInvariantId("modelInvariantId");
50 assertTrue(model.getModelInvariantId().equalsIgnoreCase("modelInvariantId"));
51 model.setModelName("modelName");
52 assertTrue(model.getModelName().equalsIgnoreCase("modelName"));
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);
64 assertTrue(model.getRecipes() == null);
65 // assertTrue(model.toString() != null);