2 * Copyright (c) 2017 Pantheon Technologies, s.r.o. 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.stmt;
10 import static org.hamcrest.CoreMatchers.instanceOf;
11 import static org.hamcrest.MatcherAssert.assertThat;
13 import org.junit.Test;
14 import org.opendaylight.yangtools.yang.common.QName;
15 import org.opendaylight.yangtools.yang.model.api.stmt.InputEffectiveStatement;
16 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaTreeEffectiveStatement;
18 public class YT841Test extends AbstractYangTest {
19 private static final QName FOO = QName.create("foo", "2018-01-02", "foo");
22 public void testFindDataSchemaNode() throws Exception {
23 final SchemaTreeEffectiveStatement<?> input = assertEffectiveModelDir("/bugs/YT841/")
24 .getModuleStatement(FOO)
25 .findSchemaTreeNode(FOO, FOO, FOO, QName.create(FOO, "input"))
27 assertThat(input, instanceOf(InputEffectiveStatement.class));