2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright 2018 TechMahindra
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=========================================================
20 package com.onap.sdnc.vnfbackupservice.model;
22 import static org.junit.Assert.assertEquals;
24 import java.sql.Timestamp;
26 import org.junit.Test;
28 import com.onap.sdnc.vnfbackupservice.model.VnfConfigDetailsDB;
30 public class VnfConfigDetailsDBTest {
33 public void configDetailsDbTest() {
35 long millis = System.currentTimeMillis();
36 Timestamp date = new java.sql.Timestamp(millis);
37 String configinfo = "configifo";
38 Timestamp creationDate = date;
39 Timestamp lastupdated = date;
41 String vnfid = "vnfId";
42 String vnfname = "vnfname";
43 String vnfversion = "Version-1";
45 VnfConfigDetailsDB vnfConfigDetailsDB = new VnfConfigDetailsDB();
46 vnfConfigDetailsDB.setVnfid(vnfid);
47 vnfConfigDetailsDB.setConfiginfo(configinfo);
48 vnfConfigDetailsDB.setCreationdate(creationDate);
49 vnfConfigDetailsDB.setLastupdated(lastupdated);
50 vnfConfigDetailsDB.setStatus(status);
51 vnfConfigDetailsDB.setVnfname(vnfname);
52 vnfConfigDetailsDB.setVnfversion(vnfversion);
54 assertEquals(vnfid, vnfConfigDetailsDB.getVnfid());
55 assertEquals(configinfo, vnfConfigDetailsDB.getConfiginfo());
56 assertEquals(creationDate, vnfConfigDetailsDB.getCreationdate());
57 assertEquals(lastupdated, vnfConfigDetailsDB.getLastupdated());
58 assertEquals(status, vnfConfigDetailsDB.getStatus());
59 assertEquals(vnfname, vnfConfigDetailsDB.getVnfname());
60 assertEquals(vnfversion, vnfConfigDetailsDB.getVnfversion());