Do do not check unique in unsupported lists
[yangtools.git] / parser / yang-parser-rfc7950 / src / test / java / org / opendaylight / yangtools / yang / stmt / Bug6150Test.java
index 8d63dbc9457a79914670cb67f834409028a1834d..c589f6a98069d5b6fc496fcdce0ade28fbaa34c2 100644 (file)
@@ -7,42 +7,22 @@
  */
 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");
     }
 }