*/
package org.opendaylight.yangtools.yang.stmt;
-import static org.junit.Assert.assertNotNull;
-import static org.opendaylight.yangtools.yang.stmt.StmtTestUtils.sourceForResource;
-
-import org.junit.Test;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.parser.rfc7950.reactor.RFC7950Reactors;
-import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
-import org.opendaylight.yangtools.yang.parser.spi.source.StatementStreamSource;
-
-public class Bug6150Test {
-
- private static final StatementStreamSource TARGET = sourceForResource("/bugs/bug6150/target.yang");
- private static final StatementStreamSource AUGMENT_FIRST = sourceForResource("/bugs/bug6150/aug-first.yang");
- private static final StatementStreamSource AUGMENT_SECOND = sourceForResource("/bugs/bug6150/aug-second.yang");
+import org.junit.jupiter.api.Test;
+class Bug6150Test extends AbstractYangTest {
@Test
- public void effectiveAugmentFirstTest() throws ReactorException {
- final SchemaContext result = RFC7950Reactors.defaultReactor().newBuild()
- .addSources(TARGET, AUGMENT_FIRST)
- .buildEffective();
- assertNotNull(result);
+ void effectiveAugmentFirstTest() {
+ assertEffectiveModel("/bugs/bug6150/target.yang", "/bugs/bug6150/aug-first.yang");
}
@Test
- public void effectiveAugmentSecondTest() throws ReactorException {
- final SchemaContext result = RFC7950Reactors.defaultReactor().newBuild()
- .addSources(TARGET, AUGMENT_SECOND)
- .buildEffective();
- assertNotNull(result);
+ void effectiveAugmentSecondTest() {
+ assertEffectiveModel("/bugs/bug6150/target.yang", "/bugs/bug6150/aug-second.yang");
}
@Test
- public void effectiveAugmentBothTest() throws ReactorException {
- final SchemaContext result = RFC7950Reactors.defaultReactor().newBuild()
- .addSources(TARGET, AUGMENT_FIRST, AUGMENT_SECOND)
- .buildEffective();
- assertNotNull(result);
+ void effectiveAugmentBothTest() {
+ assertEffectiveModel("/bugs/bug6150/target.yang", "/bugs/bug6150/aug-first.yang",
+ "/bugs/bug6150/aug-second.yang");
}
}