From 2376d8a7fd49a51728f033e332d8dad62a65dd61 Mon Sep 17 00:00:00 2001 From: Herbert Eiselt Date: Mon, 28 Jan 2019 16:20:57 +0100 Subject: Add sdnr wt devicemodel Add complete sdnr wt app devicemodel Change-Id: Ie83e72d45d7b9dc413ea6eeab0dbf9aec21bc42d Issue-ID: SDNC-574 Signed-off-by: Herbert Eiselt --- .../wt/devicemodel/test/TestNetworkElement.java | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 sdnr/wt/devicemodel/model/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemodel/test/TestNetworkElement.java (limited to 'sdnr/wt/devicemodel/model/src/test') diff --git a/sdnr/wt/devicemodel/model/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemodel/test/TestNetworkElement.java b/sdnr/wt/devicemodel/model/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemodel/test/TestNetworkElement.java new file mode 100644 index 000000000..e3b7fc9ad --- /dev/null +++ b/sdnr/wt/devicemodel/model/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemodel/test/TestNetworkElement.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * ============LICENSE_START======================================================= + * ONAP : ccsdk feature sdnr wt + * ================================================================================ + * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. + * All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + ******************************************************************************/ +package org.onap.ccsdk.features.sdnr.wt.devicemodel.test; + +import java.util.ArrayList; +import java.util.List; +import org.junit.Test; +import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.NetworkElement; +import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.NetworkElementBuilder; +import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.name.g.Name; +import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.name.g.NameBuilder; + +public class TestNetworkElement { + + @Test + public void test() { + + NetworkElementBuilder networkElementBuilder = new NetworkElementBuilder(); + + NameBuilder nameBuilder = new NameBuilder(); + nameBuilder.setValueName("name"); + nameBuilder.setValue("Device1"); + List nameList = new ArrayList<>(); + nameList.add(nameBuilder.build()); + networkElementBuilder.setName(nameList); + + + NetworkElement ne = networkElementBuilder.build(); + + System.out.println(ne.toString()); + + //fail("Not yet implemented"); + } + +} -- cgit 1.2.3-korg