2 * Copyright (c) 2016 Cisco Systems, 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.opendaylight.netconf.client.mdsal.spi;
10 import org.opendaylight.yangtools.yang.common.QName;
11 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
13 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
14 import org.opendaylight.yangtools.yang.data.api.schema.LeafNode;
15 import org.opendaylight.yangtools.yang.data.spi.node.ImmutableNodes;
17 public final class TxTestUtils {
18 private static final QName Q_NAME_1 = QName.create("test:namespace", "2013-07-22", "c");
19 private static final QName Q_NAME_2 = QName.create(Q_NAME_1, "a");
21 private TxTestUtils() {
25 static YangInstanceIdentifier getContainerId() {
26 return YangInstanceIdentifier.builder().node(Q_NAME_1).build();
29 static YangInstanceIdentifier getLeafId() {
30 return YangInstanceIdentifier.builder().node(Q_NAME_1).node(Q_NAME_2).build();
33 static ContainerNode getContainerNode() {
34 return ImmutableNodes.newContainerBuilder().withNodeIdentifier(new NodeIdentifier(Q_NAME_1)).build();
37 public static LeafNode<String> getLeafNode() {
38 return ImmutableNodes.leafNode(Q_NAME_2, "data");