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.Assert.assertNotNull;
11 import static org.opendaylight.yangtools.yang.stmt.StmtTestUtils.sourceForResource;
13 import org.junit.Test;
14 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
15 import org.opendaylight.yangtools.yang.parser.impl.DefaultReactors;
16 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
17 import org.opendaylight.yangtools.yang.parser.spi.source.StatementStreamSource;
19 public class Bug6150Test {
21 private static final StatementStreamSource TARGET = sourceForResource("/bugs/bug6150/target.yang");
22 private static final StatementStreamSource AUGMENT_FIRST = sourceForResource("/bugs/bug6150/aug-first.yang");
23 private static final StatementStreamSource AUGMENT_SECOND = sourceForResource("/bugs/bug6150/aug-second.yang");
26 public void effectiveAugmentFirstTest() throws ReactorException {
27 final SchemaContext result = DefaultReactors.defaultReactor().newBuild()
28 .addSources(TARGET, AUGMENT_FIRST)
30 assertNotNull(result);
34 public void effectiveAugmentSecondTest() throws ReactorException {
35 final SchemaContext result = DefaultReactors.defaultReactor().newBuild()
36 .addSources(TARGET, AUGMENT_SECOND)
38 assertNotNull(result);
42 public void effectiveAugmentBothTest() throws ReactorException {
43 final SchemaContext result = DefaultReactors.defaultReactor().newBuild()
44 .addSources(TARGET, AUGMENT_FIRST, AUGMENT_SECOND)
46 assertNotNull(result);