2 * Copyright (c) 2015 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.yangtools.yang.data.tree.impl;
10 import org.opendaylight.yangtools.yang.common.QName;
11 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
12 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
13 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
15 public final class TestModel {
17 public static final QName TEST_QNAME = QName.create(
18 "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:test", "2014-03-13", "test");
19 public static final QName OUTER_LIST_QNAME = QName.create(TEST_QNAME, "outer-list");
20 public static final QName INNER_LIST_QNAME = QName.create(TEST_QNAME, "inner-list");
21 public static final QName OUTER_CHOICE_QNAME = QName.create(TEST_QNAME, "outer-choice");
22 public static final QName INNER_CONTAINER_QNAME = QName.create(TEST_QNAME, "inner-container");
23 public static final QName ID_QNAME = QName.create(TEST_QNAME, "id");
24 public static final QName NAME_QNAME = QName.create(TEST_QNAME, "name");
25 public static final QName VALUE_QNAME = QName.create(TEST_QNAME, "value");
27 public static final QName NON_PRESENCE_QNAME = QName.create(TEST_QNAME, "non-presence");
28 public static final QName DEEP_CHOICE_QNAME = QName.create(TEST_QNAME, "deep-choice");
29 public static final QName A_LIST_QNAME = QName.create(TEST_QNAME, "a-list");
30 public static final QName A_NAME_QNAME = QName.create(TEST_QNAME, "a-name");
32 public static final YangInstanceIdentifier TEST_PATH = YangInstanceIdentifier.of(TEST_QNAME);
33 public static final YangInstanceIdentifier OUTER_LIST_PATH = YangInstanceIdentifier.builder(TEST_PATH)
34 .node(OUTER_LIST_QNAME).build();
35 public static final YangInstanceIdentifier INNER_CONTAINER_PATH = TEST_PATH.node(INNER_CONTAINER_QNAME);
36 public static final YangInstanceIdentifier VALUE_PATH = YangInstanceIdentifier.of(VALUE_QNAME);
37 public static final YangInstanceIdentifier INNER_VALUE_PATH = INNER_CONTAINER_PATH.node(VALUE_QNAME);
38 public static final YangInstanceIdentifier NON_PRESENCE_PATH = YangInstanceIdentifier.of(NON_PRESENCE_QNAME);
39 public static final YangInstanceIdentifier DEEP_CHOICE_PATH = NON_PRESENCE_PATH.node(DEEP_CHOICE_QNAME);
40 public static final YangInstanceIdentifier NAME_PATH = NON_PRESENCE_PATH.node(NAME_QNAME);
42 public static final QName TWO_QNAME = QName.create(TEST_QNAME, "two");
43 public static final QName THREE_QNAME = QName.create(TEST_QNAME, "three");
46 throw new UnsupportedOperationException();
49 // FIXME: inline into single caller
50 public static EffectiveModelContext createTestContext() {
51 return createTestContext("/odl-datastore-test.yang");
54 // FIXME: remove this method
55 public static EffectiveModelContext createTestContext(final String resourcePath) {
56 return YangParserTestUtils.parseYangResources(TestModel.class, resourcePath);