X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-data-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fdata%2Fimpl%2Fschema%2FBuilderTest.java;h=e4ede1f76e8ed059e3df8750755747a7958ee74f;hb=631451dffc88bef43df4834f6d9e241c0b5d57c5;hp=0c2c6e8c5081a92e1971a2ca5ba85fc63d31d8b3;hpb=f973371b1b2447dae168402a187eb997966df347;p=yangtools.git diff --git a/yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/schema/BuilderTest.java b/yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/schema/BuilderTest.java index 0c2c6e8c50..e4ede1f76e 100644 --- a/yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/schema/BuilderTest.java +++ b/yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/schema/BuilderTest.java @@ -11,6 +11,7 @@ package org.opendaylight.yangtools.yang.data.impl.schema; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.mockito.Mockito.mock; + import java.io.File; import java.io.FileNotFoundException; import java.net.URISyntaxException; @@ -79,8 +80,8 @@ public class BuilderTest { private static final MapEntryNode LIST_MAIN_CHILD_1 = ImmutableNodes.mapEntry(LIST_MAIN, LIST_MAIN_CHILD_QNAME_1, 1); private static final MapEntryNode LIST_MAIN_CHILD_2 = ImmutableNodes.mapEntry(LIST_MAIN, LIST_MAIN_CHILD_QNAME_1, 2); private static final MapEntryNode LIST_MAIN_CHILD_3 = ImmutableNodes.mapEntry(LIST_MAIN, LIST_MAIN_CHILD_QNAME_1, 3); - private static final Integer SIZE = 3; - private static final NodeWithValue BAR_PATH = new NodeWithValue<>(LEAF_LIST_MAIN, "bar"); + private static final int SIZE = 3; + private static final NodeWithValue BAR_PATH = new NodeWithValue<>(LEAF_LIST_MAIN, "bar"); private static final LeafSetEntryNode LEAF_SET_ENTRY_NODE = ImmutableLeafSetEntryNodeBuilder.create() .withNodeIdentifier(BAR_PATH) .withValue("bar") @@ -127,13 +128,11 @@ public class BuilderTest { .build(); assertNotNull(Builders.orderedMapBuilder(list)); - assertEquals(SIZE, (Integer) orderedMapNodeCreateNull.getSize()); + assertEquals(SIZE, orderedMapNodeCreateNull.getSize()); assertEquals(orderedMapNodeCreateNode.getSize(), orderedMapNodeCreateNull.getSize() - 1); assertEquals(NODE_IDENTIFIER_LIST, orderedMapNodeCreateSize.getIdentifier()); - assertEquals(orderedMapNodeCreateNull.getChild(0), LIST_MAIN_CHILD_1); - assertEquals((Integer) orderedMapNodeCreateNull.getValue().size(), SIZE); - assertNotNull(orderedMapNodeCreateNull.hashCode()); - assertEquals((Integer) orderedMapNodeCreateNull.getValue().size(), SIZE); + assertEquals(LIST_MAIN_CHILD_1, orderedMapNodeCreateNull.getChild(0)); + assertEquals(SIZE, orderedMapNodeCreateNull.getValue().size()); assertEquals(orderedMapNodeSchemaAware.getChild(0), orderedMapNodeSchemaAwareMapNodeConst.getChild(0)); } @@ -159,7 +158,6 @@ public class BuilderTest { assertNotNull(Builders.orderedLeafSetBuilder(leafList)); assertNotNull(Builders.anyXmlBuilder()); - assertNotNull(orderedLeafSetShemaAware.hashCode()); assertNotNull(orderedLeafSetShemaAware); assertEquals(1, ((OrderedLeafSetNode)orderedLeafSet).getSize()); assertEquals("baz", ((OrderedLeafSetNode)orderedLeafSet).getChild(0).getValue()); @@ -177,7 +175,6 @@ public class BuilderTest { collectionNodeBuilder.withNodeIdentifier(NODE_IDENTIFIER_LEAF_LIST); collectionNodeBuilder.withValue(mapEntryNodeColl); final MapNode mapNode = collectionNodeBuilder.build(); - assertNotNull(mapNode.hashCode()); final MapNode mapNodeSchemaAware = ImmutableMapNodeSchemaAwareBuilder.create(list, getImmutableMapNode()).build(); assertNotNull(mapNodeSchemaAware); assertNotNull(Builders.mapBuilder(mapNode)); @@ -219,7 +216,6 @@ public class BuilderTest { } catch (IndexOutOfBoundsException e) { } - assertNotNull(unkeyedListNodeSize.getSize()); assertNotNull(unkeyedListNodeSize.getValue()); assertEquals(unkeyedListEntryNode, unkeyedListNodeCreated.getChild(0)); assertEquals(unkeyedListNode.getNodeType().getLocalName(), unkeyedListNodeSize.getNodeType()