Adjust test suite parser update to conform with API changes
[yangtools.git] / yang / yang-parser-rfc7950 / src / test / java / org / opendaylight / yangtools / yang / stmt / AugmentSimplestTest.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
9 package org.opendaylight.yangtools.yang.stmt;
10
11 import static org.junit.Assert.assertNotNull;
12 import static org.opendaylight.yangtools.yang.stmt.StmtTestUtils.sourceForResource;
13
14 import org.junit.Test;
15 import org.opendaylight.yangtools.yang.parser.rfc7950.reactor.RFC7950Reactors;
16 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
17 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
18 import org.opendaylight.yangtools.yang.parser.spi.source.StatementStreamSource;
19 import org.opendaylight.yangtools.yang.parser.stmt.reactor.EffectiveModelContext;
20
21 public class AugmentSimplestTest {
22
23     private static final StatementStreamSource AUGMENTED = sourceForResource(
24         "/semantic-statement-parser/augmented.yang");
25     private static final StatementStreamSource ROOT = sourceForResource("/semantic-statement-parser/root.yang");
26
27     @Test
28     public void readAndParseYangFileTest() throws SourceException, ReactorException {
29         EffectiveModelContext result = RFC7950Reactors.defaultReactor().newBuild()
30                 .addSources(AUGMENTED, ROOT)
31                 .build();
32         assertNotNull(result);
33     }
34 }