Move Ids interface to test-model 73/7073/2
authorMarek Gradzki <mgradzki@cisco.com>
Fri, 9 Jun 2017 06:43:25 +0000 (08:43 +0200)
committerMarek Gradzki <mgradzki@cisco.com>
Fri, 9 Jun 2017 10:44:13 +0000 (12:44 +0200)
The interface is useful for testing infra with HC's test-model

Change-Id: I6c1fd1888bccfd2ff461984bc0b4b7c42ce65347
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombReadInfraTest.java
infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombSubtreeReadInfraTest.java
infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombWriteInfraTest.java
infra/it/test-model/src/main/java/io/fd/honeycomb/test/model/Ids.java [moved from infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/Ids.java with 91% similarity]

index 53fd2e9..2c50a53 100644 (file)
@@ -36,6 +36,7 @@ import com.google.common.base.Optional;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Multimap;
 import com.google.common.util.concurrent.CheckedFuture;
+import io.fd.honeycomb.test.model.Ids;
 import io.fd.honeycomb.translate.impl.read.GenericListReader;
 import io.fd.honeycomb.translate.impl.read.GenericReader;
 import io.fd.honeycomb.translate.impl.read.registry.CompositeReaderRegistryBuilder;
@@ -44,8 +45,8 @@ import io.fd.honeycomb.translate.read.ReadContext;
 import io.fd.honeycomb.translate.read.ReadFailedException;
 import io.fd.honeycomb.translate.read.Reader;
 import io.fd.honeycomb.translate.read.registry.ReaderRegistry;
-import io.fd.honeycomb.translate.util.YangDAG;
 import io.fd.honeycomb.translate.util.RWUtils;
+import io.fd.honeycomb.translate.util.YangDAG;
 import io.fd.honeycomb.translate.util.read.ReflexiveListReaderCustomizer;
 import io.fd.honeycomb.translate.util.read.ReflexiveReaderCustomizer;
 import java.lang.reflect.InvocationTargetException;
index b586a18..cfff6e3 100644 (file)
@@ -25,6 +25,7 @@ import com.google.common.collect.Lists;
 import com.google.common.collect.Multimap;
 import com.google.common.collect.Sets;
 import com.google.common.util.concurrent.CheckedFuture;
+import io.fd.honeycomb.test.model.Ids;
 import io.fd.honeycomb.translate.impl.read.GenericListReader;
 import io.fd.honeycomb.translate.impl.read.registry.CompositeReaderRegistryBuilder;
 import io.fd.honeycomb.translate.read.ListReader;
index b98c912..cd1816f 100644 (file)
@@ -75,6 +75,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.TipProducingDataTree;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType;
 import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory;
+import io.fd.honeycomb.test.model.Ids;
 
 /**
  * Testing honeycomb writes from data tree up to mocked writers.
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.data.impl;
+package io.fd.honeycomb.test.model;
 
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hc.test.rev150105.ComplexAugment;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hc.test.rev150105.ContainerWithChoice;
@@ -30,33 +30,29 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hc.test.
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
- * Instance identifiers referencing all complex nodes within IT test-model.
+ * Instance identifiers referencing all complex nodes within honeycomb's test-model.
  */
-interface Ids {
+public interface Ids {
 
-    // Simple container
-    // ORDER = 3
     InstanceIdentifier<SimpleContainer> SIMPLE_CONTAINER_ID = InstanceIdentifier.create(SimpleContainer.class);
-    // 2
+
     InstanceIdentifier<SimpleAugment> SIMPLE_AUGMENT_ID = SIMPLE_CONTAINER_ID.augmentation(SimpleAugment.class);
-    // UNORDERED
+
     InstanceIdentifier<ComplexAugment> COMPLEX_AUGMENT_ID = SIMPLE_CONTAINER_ID.augmentation(ComplexAugment.class);
-    // 1
+
     InstanceIdentifier<ComplexAugmentContainer> COMPLEX_AUGMENT_CONTAINER_ID = COMPLEX_AUGMENT_ID.child(ComplexAugmentContainer.class);
-    // Container with list
-    // 9
+
     InstanceIdentifier<ContainerWithList> CONTAINER_WITH_LIST_ID = InstanceIdentifier.create(ContainerWithList.class);
-    // 7
+
     InstanceIdentifier<ListInContainer> LIST_IN_CONTAINER_ID = CONTAINER_WITH_LIST_ID.child(ListInContainer.class);
-    // 8
+
     InstanceIdentifier<ContainerInList> CONTAINER_IN_LIST_ID = LIST_IN_CONTAINER_ID.child(ContainerInList.class);
-    // 6
+
     InstanceIdentifier<NestedList> NESTED_LIST_ID = CONTAINER_IN_LIST_ID.child(NestedList.class);
-    // Container with choice
-    // 4
+
     InstanceIdentifier<ContainerWithChoice> CONTAINER_WITH_CHOICE_ID = InstanceIdentifier.create(ContainerWithChoice.class);
-    // 2
+
     InstanceIdentifier<C3> C3_ID = CONTAINER_WITH_CHOICE_ID.child(C3.class);
-    // 5
+
     InstanceIdentifier<ContainerFromGrouping> CONTAINER_FROM_GROUPING_ID = CONTAINER_WITH_CHOICE_ID.child(ContainerFromGrouping.class);
 }