Move Bug5437Test to yang-model-util-ut 19/95119/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 10 Feb 2021 15:44:09 +0000 (16:44 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 10 Feb 2021 15:44:59 +0000 (16:44 +0100)
This is pure UT for yang-model-util, rehost it and rename it to
new parlance -- YT588Test.

JIRA: YANGTOOLS-1052
Change-Id: I517ea393005d6ba16d5bcf6c4fc9ffe95b6a7e20
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-model-util-ut/src/test/java/org/opendaylight/yangtools/yang/model/util/ut/YT588Test.java [moved from yang/yang-parser-rfc7950/src/test/java/org/opendaylight/yangtools/yang/stmt/Bug5437Test.java with 91% similarity]
yang/yang-model-util-ut/src/test/resources/yt588.yang [moved from yang/yang-parser-rfc7950/src/test/resources/bugs/bug5437/foo.yang with 100% similarity]

similarity index 91%
rename from yang/yang-parser-rfc7950/src/test/java/org/opendaylight/yangtools/yang/stmt/Bug5437Test.java
rename to yang/yang-model-util-ut/src/test/java/org/opendaylight/yangtools/yang/model/util/ut/YT588Test.java
index 5eac7c50c526a6299f119c11fff284706dc50af4..31355d37a977ff80d0d3f4af1c00a456ea0134df 100644 (file)
@@ -5,11 +5,10 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.yangtools.yang.stmt;
+package org.opendaylight.yangtools.yang.model.util.ut;
 
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.isA;
-import static org.junit.Assert.assertNotNull;
 
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.common.QName;
@@ -21,15 +20,15 @@ import org.opendaylight.yangtools.yang.model.api.type.BinaryTypeDefinition;
 import org.opendaylight.yangtools.yang.model.api.type.Int16TypeDefinition;
 import org.opendaylight.yangtools.yang.model.api.type.LeafrefTypeDefinition;
 import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil;
+import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
 
-public class Bug5437Test {
+public class YT588Test {
     private static final String NS = "foo";
     private static final String REV = "2016-03-01";
 
     @Test
     public void test() throws Exception {
-        SchemaContext context = StmtTestUtils.parseYangSources("/bugs/bug5437");
-        assertNotNull(context);
+        SchemaContext context = YangParserTestUtils.parseYangResource("/yt588.yang");
 
         QName root = QName.create(NS, REV, "root");
         QName leafRef2 = QName.create(NS, REV, "leaf-ref-2");