Improve mod/runtimeapi code coverage
[dcaegen2/platform.git] / mod / runtimeapi / runtime-core / src / test / java / org / onap / dcae / runtime / core / TestBeans.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  * ============LICENSE_END=========================================================
17  */
18
19 package org.onap.dcae.runtime.core;
20
21 import static org.junit.Assert.assertEquals;
22 import static org.junit.Assert.assertTrue;
23
24 import org.junit.Test;
25
26 public class TestBeans {
27     @Test
28     public void testBeans() {
29         BlueprintData bpd = new BlueprintData("version", "content");
30         bpd.setVersion(bpd.getVersion());
31         bpd.setBlueprint_content(bpd.getBlueprint_content());
32         Edge edg = new Edge(null, null, null);
33         edg.setSrc(edg.getSrc());
34         edg.setTgt(edg.getTgt());
35         edg.setMetadata(edg.getMetadata());
36         EdgeLocation el = new EdgeLocation("node", "port");
37         el.setNode(el.getNode());
38         el.setPort(el.getPort());
39         EdgeMetadata em = new EdgeMetadata("name", "data_type", "dmaap_type");
40         em.setName(em.getName());
41         em.setDataType(em.getDataType());
42         em.setDmaapType(em.getDmaapType());
43         Node nod = new Node("componentId", "componentName", "componentSpec");
44         nod.setComponentId(nod.getComponentId());
45         nod.setComponentName(nod.getComponentName());
46         nod.setComponentSpec(nod.getComponentSpec());
47         nod.setBlueprintData(nod.getBlueprintData());
48         assertTrue(nod.equals(nod));
49         assertEquals(nod.toString(), "componentId");
50     }
51 }