Migrated all YANG testfiles counting 50 lines or less.
JIRA: YANGTOOLS-1506
Change-Id: If319c2397d546ddfaa2e2fff3f3ff79124982e0e
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
@BeforeAll
static void init() {
- CONTEXT = DataSchemaContextTree.from(YangParserTestUtils.parseYangResource("/dataschemacontext.yang"));
+ CONTEXT = DataSchemaContextTree.from(YangParserTestUtils.parseYang("""
+ module dataschemacontext {
+ namespace "dataschemacontext";
+ prefix dsc;
+
+ container foo {
+ choice bar {
+ leaf baz {
+ type string;
+ }
+ }
+ }
+ }"""));
}
@AfterAll
@BeforeAll
static void init() {
- SCHEMA_CONTEXT = YangParserTestUtils.parseYangResource("/yangtools846.yang");
+ SCHEMA_CONTEXT = YangParserTestUtils.parseYang("""
+ module yangtools846 {
+ namespace "yangtools846";
+ prefix yt846;
+
+ identity foo;
+ }""");
}
@AfterAll
@BeforeAll
static void init() {
- CONTEXT = DataSchemaContextTree.from(YangParserTestUtils.parseYangResource("/yt1412.yang"));
+ CONTEXT = DataSchemaContextTree.from(YangParserTestUtils.parseYang("""
+ module foo {
+ namespace foo;
+ prefix foo;
+ yang-version 1.1;
+
+ container one {
+ choice two {
+ choice three {
+ leaf four {
+ type string;
+ }
+ }
+ }
+ }
+
+ augment /one {
+ list five;
+ }
+
+ augment /one/two/three/three {
+ leaf six {
+ type string;
+ }
+ }
+ }"""));
}
@AfterAll
+++ /dev/null
-module dataschemacontext {
- namespace "dataschemacontext";
- prefix dsc;
-
- container foo {
- choice bar {
- leaf baz {
- type string;
- }
- }
- }
-}
+++ /dev/null
-module yangtools846 {
- namespace "yangtools846";
- prefix yt846;
-
- identity foo;
-}
-
+++ /dev/null
-module foo {
- namespace foo;
- prefix foo;
- yang-version 1.1;
-
- container one {
- choice two {
- choice three {
- leaf four {
- type string;
- }
- }
- }
- }
-
- augment /one {
- list five;
- }
-
- augment /one/two/three/three {
- leaf six {
- type string;
- }
- }
-}