Migrate YANG inputs for yang-data-codec-gson
[yangtools.git] / codec / yang-data-codec-gson / src / test / java / org / opendaylight / yangtools / yang / data / codec / gson / Bug6112Test.java
index 60831244d351e47aabf9995284ed1b6685ee70e8..fef678561421daf8a4e74d77c14b6fa33dc27a66 100644 (file)
@@ -35,7 +35,35 @@ public class Bug6112Test {
 
     @BeforeClass
     public static void initialization() {
-        schemaContext = YangParserTestUtils.parseYangResourceDirectory("/bug-6112/yang");
+        schemaContext = YangParserTestUtils.parseYang("""
+            module union-with-identityref {
+              yang-version 1;
+              namespace "union:identityref:test";
+              prefix "unionidentityreftest";
+              description "test union with identityref";
+              revision "2016-07-12";
+
+              identity ident-base;
+
+              identity ident-one {
+                base ident-base;
+              }
+
+              typedef union-type {
+                type union {
+                  type uint8;
+                  type identityref {
+                    base ident-base;
+                  }
+                }
+              }
+
+              container root {
+                leaf leaf-value {
+                  type union-type;
+                }
+              }
+            }""");
     }
 
     @AfterClass