use of org.opendaylight.yangtools.odlext.model.api.MountEffectiveStatement in project yangtools by opendaylight.
the class MountTest method test.
@Test
public void test() throws Exception {
final ModuleEffectiveStatement foo = reactor.newBuild().addSource(YangStatementStreamSource.create(YangTextSchemaSource.forResource("/yang-ext.yang"))).addSource(YangStatementStreamSource.create(YangTextSchemaSource.forResource("/mount.yang"))).buildEffective().getModuleStatements().get(FOO);
final Optional<MountEffectiveStatement> fooMount = foo.findDataTreeNode(QName.create(FOO, "foo")).orElseThrow().findFirstEffectiveSubstatement(MountEffectiveStatement.class);
assertTrue(fooMount.isPresent());
final Optional<MountEffectiveStatement> barMount = foo.findDataTreeNode(QName.create(FOO, "bar")).orElseThrow().findFirstEffectiveSubstatement(MountEffectiveStatement.class);
assertTrue(barMount.isPresent());
}
Aggregations