4def7eb92e568a14a47ae74ee7b1206da74483a1
[netconf.git] / plugins / netconf-client-mdsal / src / test / java / org / opendaylight / netconf / client / mdsal / spi / TxTestUtils.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.netconf.client.mdsal.spi;
9
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.schema.ContainerNode;
13 import org.opendaylight.yangtools.yang.data.api.schema.LeafNode;
14 import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
15
16 public final class TxTestUtils {
17     private static final QName Q_NAME_1 = QName.create("test:namespace", "2013-07-22", "c");
18     private static final QName Q_NAME_2 = QName.create(Q_NAME_1, "a");
19
20     private TxTestUtils() {
21         // Hidden on purpose
22     }
23
24     static YangInstanceIdentifier getContainerId() {
25         return YangInstanceIdentifier.builder().node(Q_NAME_1).build();
26     }
27
28     static YangInstanceIdentifier getLeafId() {
29         return YangInstanceIdentifier.builder().node(Q_NAME_1).node(Q_NAME_2).build();
30     }
31
32     static ContainerNode getContainerNode() {
33         return ImmutableNodes.containerNode(Q_NAME_1);
34     }
35
36     public static LeafNode<String> getLeafNode() {
37         return ImmutableNodes.leafNode(Q_NAME_2, "data");
38     }
39 }