2 * Copyright (c) 2019 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.onap.ccsdk.features.sdnr.wt.devicemanager.test;
10 import org.junit.Test;
11 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.database.HtMapper;
12 import org.onap.ccsdk.features.sdnr.wt.devicemanager.performancemanager.impl.database.types.EsHistoricalPerformance15Minutes;
13 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
14 import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.LayerProtocolName;
15 import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.UniversalId;
16 import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.logical.termination.point.g.Lp;
17 import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.logical.termination.point.g.LpBuilder;
18 import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.microwave.model.rev181010.air._interface.historical.performances.g.HistoricalPerformanceDataListBuilder;
20 public class TestMapper {
26 System.out.println(t++);
28 HtMapper<EsHistoricalPerformance15Minutes> mapper = new HtMapper<>(EsHistoricalPerformance15Minutes.class);
29 System.out.println(t++);
32 Lp layerProtocol = new LpBuilder().setUuid(new UniversalId("TestId")).setLayerProtocolName(new LayerProtocolName("LayprotcolTest")).build();
33 System.out.println(t++);
34 EsHistoricalPerformance15Minutes pmData = new EsHistoricalPerformance15Minutes("Testnode", layerProtocol);
35 System.out.println(t++);
37 //AirInterfaceHistoricalPerformancesBuilder builder1 = new AirInterfaceHistoricalPerformancesBuilder();
38 //System.out.println(t++);
41 HistoricalPerformanceDataListBuilder builder2 = new HistoricalPerformanceDataListBuilder();
42 System.out.println(t++);
43 builder2.setPeriodEndTime(new DateAndTime("2019-06-06T12:12:12.1Z"));
44 System.out.println(t++);
46 String json = mapper.objectToJson(pmData);
48 System.out.println("Result: "+pmData);
49 System.out.println("Result: "+json);
51 //fail("Not yet implemented");