import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.mockito.Mockito.mock;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.mockito.Mockito.mock;
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 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<String> BAR_PATH = new NodeWithValue<>(LEAF_LIST_MAIN, "bar");
private static final LeafSetEntryNode LEAF_SET_ENTRY_NODE = ImmutableLeafSetEntryNodeBuilder.create()
.withNodeIdentifier(BAR_PATH)
.withValue("bar")
private static final LeafSetEntryNode LEAF_SET_ENTRY_NODE = ImmutableLeafSetEntryNodeBuilder.create()
.withNodeIdentifier(BAR_PATH)
.withValue("bar")
assertEquals(orderedMapNodeCreateNode.getSize(), orderedMapNodeCreateNull.getSize() - 1);
assertEquals(NODE_IDENTIFIER_LIST, orderedMapNodeCreateSize.getIdentifier());
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());
assertNotNull(orderedLeafSetShemaAware);
assertEquals(1, ((OrderedLeafSetNode<?>)orderedLeafSet).getSize());
assertEquals("baz", ((OrderedLeafSetNode<?>)orderedLeafSet).getChild(0).getValue());
assertNotNull(orderedLeafSetShemaAware);
assertEquals(1, ((OrderedLeafSetNode<?>)orderedLeafSet).getSize());
assertEquals("baz", ((OrderedLeafSetNode<?>)orderedLeafSet).getChild(0).getValue());
collectionNodeBuilder.withNodeIdentifier(NODE_IDENTIFIER_LEAF_LIST);
collectionNodeBuilder.withValue(mapEntryNodeColl);
final MapNode mapNode = collectionNodeBuilder.build();
collectionNodeBuilder.withNodeIdentifier(NODE_IDENTIFIER_LEAF_LIST);
collectionNodeBuilder.withValue(mapEntryNodeColl);
final MapNode mapNode = collectionNodeBuilder.build();
final MapNode mapNodeSchemaAware = ImmutableMapNodeSchemaAwareBuilder.create(list, getImmutableMapNode()).build();
assertNotNull(mapNodeSchemaAware);
assertNotNull(Builders.mapBuilder(mapNode));
final MapNode mapNodeSchemaAware = ImmutableMapNodeSchemaAwareBuilder.create(list, getImmutableMapNode()).build();
assertNotNull(mapNodeSchemaAware);
assertNotNull(Builders.mapBuilder(mapNode));
assertNotNull(unkeyedListNodeSize.getValue());
assertEquals(unkeyedListEntryNode, unkeyedListNodeCreated.getChild(0));
assertEquals(unkeyedListNode.getNodeType().getLocalName(), unkeyedListNodeSize.getNodeType()
assertNotNull(unkeyedListNodeSize.getValue());
assertEquals(unkeyedListEntryNode, unkeyedListNodeCreated.getChild(0));
assertEquals(unkeyedListNode.getNodeType().getLocalName(), unkeyedListNodeSize.getNodeType()