Move YANGTOOLS-892 test 44/86644/3
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 30 Dec 2019 20:17:49 +0000 (21:17 +0100)
committerRobert Varga <nite@hq.sk>
Mon, 30 Dec 2019 21:56:41 +0000 (21:56 +0000)
As the test does not rely on anything XML, move it to yang-data-impl,
where the tested implementation actually lives.

Change-Id: I9d77734bc05e5c4b1033da5f32f9bc80f50bd827
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/leafref/YT892Test.java [moved from yang/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/Yangtools892Test.java with 97% similarity]
yang/yang-data-impl/src/test/resources/yt892/bgp-test-extensions.yang [moved from yang/yang-data-codec-xml/src/test/resources/yangtools892/bgp-test-extensions.yang with 100% similarity]
yang/yang-data-impl/src/test/resources/yt892/test-bgp-multiprotocol.yang [moved from yang/yang-data-codec-xml/src/test/resources/yangtools892/test-bgp-multiprotocol.yang with 100% similarity]
yang/yang-data-impl/src/test/resources/yt892/test-bgp-types.yang [moved from yang/yang-data-codec-xml/src/test/resources/yangtools892/test-bgp-types.yang with 100% similarity]
yang/yang-data-impl/src/test/resources/yt892/test-bgp.yang [moved from yang/yang-data-codec-xml/src/test/resources/yangtools892/test-bgp.yang with 100% similarity]
yang/yang-data-impl/src/test/resources/yt892/test-network-instance.yang [moved from yang/yang-data-codec-xml/src/test/resources/yangtools892/test-network-instance.yang with 100% similarity]
yang/yang-data-impl/src/test/resources/yt892/test-policy-types.yang [moved from yang/yang-data-codec-xml/src/test/resources/yangtools892/test-policy-types.yang with 100% similarity]

similarity index 97%
rename from yang/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/Yangtools892Test.java
rename to yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/leafref/YT892Test.java
index 2cf64c8fb532bf3f7babc7eb4222a31952d93dbb..1e7c3d3a1e5a2d0776f89f9020b90a3bbe7c90d9 100644 (file)
@@ -5,7 +5,7 @@
  * 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.data.codec.xml;
+package org.opendaylight.yangtools.yang.data.impl.leafref;
 
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
@@ -21,15 +21,13 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeConfiguration;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
-import org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefContext;
-import org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefValidation;
 import org.opendaylight.yangtools.yang.data.impl.schema.Builders;
 import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
 import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
 
-public class Yangtools892Test {
+public class YT892Test {
     private static final QName BGP = QName.create("urn:opendaylight:params:xml:ns:yang:test:bgp", "2018-08-14", "bgp");
     private static final QName PEER_GROUPS = QName.create(BGP, "peer-groups");
     private static final QName PEER_GROUP = QName.create(BGP, "peer-group");
@@ -64,13 +62,12 @@ public class Yangtools892Test {
 
     private static final YangInstanceIdentifier NETWORK_INSTANCES_ID = YangInstanceIdentifier.of(NETWORK_INSTANCES);
 
-    private SchemaContext schemaContext;
     private LeafRefContext leafRefContext;
     private DataTree dataTree;
 
     @Before
     public void setup() {
-        schemaContext = YangParserTestUtils.parseYangResourceDirectory("/yangtools892");
+        final SchemaContext schemaContext = YangParserTestUtils.parseYangResourceDirectory("/yt892");
         leafRefContext = LeafRefContext.create(schemaContext);
         dataTree = new InMemoryDataTreeFactory().create(DataTreeConfiguration.DEFAULT_CONFIGURATION, schemaContext);
     }