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.yangtools.yang.stmt;
10 import static org.junit.jupiter.api.Assertions.assertNotNull;
11 import static org.opendaylight.yangtools.yang.stmt.StmtTestUtils.sourceForResource;
13 import org.junit.jupiter.api.Test;
14 import org.opendaylight.yangtools.yang.parser.rfc7950.reactor.RFC7950Reactors;
15 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
16 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
17 import org.opendaylight.yangtools.yang.parser.spi.source.StatementStreamSource;
18 import org.opendaylight.yangtools.yang.parser.stmt.reactor.ReactorDeclaredModel;
20 class AugmentSimplestTest {
22 private static final StatementStreamSource AUGMENTED = sourceForResource(
23 "/semantic-statement-parser/augmented.yang");
24 private static final StatementStreamSource ROOT = sourceForResource("/semantic-statement-parser/root.yang");
27 void readAndParseYangFileTest() throws SourceException, ReactorException {
28 ReactorDeclaredModel result = RFC7950Reactors.defaultReactor().newBuild()
29 .addSources(AUGMENTED, ROOT)
31 assertNotNull(result);