Migrate YANG inputs for yang-data-codec-binfmt 83/105883/7
authormatus.matok <matus.matok@pantheon.tech>
Thu, 18 May 2023 12:46:00 +0000 (14:46 +0200)
committerRobert Varga <nite@hq.sk>
Mon, 22 May 2023 06:03:39 +0000 (06:03 +0000)
Migrated all YANG testfiles counting 50 lines or less.

JIRA: YANGTOOLS-1506
Change-Id: I2cb5778ccdc7edc1ae7eece1a79c716928a0655c
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
codec/yang-data-codec-binfmt/src/test/java/org/opendaylight/yangtools/yang/data/codec/binfmt/DataTreeCandidateInputOutputTest.java
codec/yang-data-codec-binfmt/src/test/resources/foo.yang [deleted file]

index c5aaa87269dc36bfac13bb5066edaf9ce3ecbf9a..b6dba1105fd090c0c66df1069f41b2415dec08e2 100644 (file)
@@ -53,7 +53,22 @@ public class DataTreeCandidateInputOutputTest {
 
     @BeforeClass
     public static void beforeClass() {
-        CONTEXT = YangParserTestUtils.parseYangResource("/foo.yang");
+        CONTEXT = YangParserTestUtils.parseYang("""
+            module foo {
+              namespace foo;
+              prefix foo;
+              container foo {
+                leaf bar {
+                  type string;
+                }
+              }
+              container bar {
+                presence "is explicit";
+                leaf baz {
+                  type string;
+                }
+              }
+            }""");
     }
 
     @Before
diff --git a/codec/yang-data-codec-binfmt/src/test/resources/foo.yang b/codec/yang-data-codec-binfmt/src/test/resources/foo.yang
deleted file mode 100644 (file)
index 5326d80..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-module foo {
-  namespace foo;
-  prefix foo;
-
-  container foo {
-    leaf bar {
-      type string;
-    }
-  }
-
-  container bar { 
-    presence "is explicit";
-
-    leaf baz {
-      type string;
-    }
-  }
-}