- return Stream.of(
- Arguments.of("container (root level)",
- ANYDATA_XML,
- Inference.ofDataTreePath(SCHEMA_CONTEXT, CONT_QNAME),
- Builders.containerBuilder().withNodeIdentifier(CONT_NODEID).withChild(LEAF_NODE).build()),
- Arguments.of("container (level 2)",
- ANYDATA_XML,
- Inference.ofDataTreePath(SCHEMA_CONTEXT, CONT_QNAME, BAR_QNAME),
- Builders.containerBuilder().withNodeIdentifier(BAR_NODEID).withChild(LEAF_NODE).build()),
- Arguments.of("empty container",
- ANYDATA_EMPTY_XML,
- Inference.ofDataTreePath(SCHEMA_CONTEXT, CONT_QNAME, BAR_QNAME),
- ImmutableNodes.containerNode(BAR_NODEID)),
- Arguments.of("single list element",
- ANYDATA_XML,
- Inference.ofDataTreePath(SCHEMA_CONTEXT, LIST_QNAME),
- Builders.unkeyedListBuilder().withNodeIdentifier(LIST_NODEID).withChild(
- Builders.unkeyedListEntryBuilder().withNodeIdentifier(LIST_NODEID)
- .withChild(LEAF_NODE).build()).build()),
- Arguments.of("single empty list element",
- ANYDATA_EMPTY_XML,
- Inference.ofDataTreePath(SCHEMA_CONTEXT, LIST_QNAME),
- Builders.unkeyedListBuilder().withNodeIdentifier(LIST_NODEID).withChild(
- Builders.unkeyedListEntryBuilder().withNodeIdentifier(LIST_NODEID).build()).build()),
- Arguments.of("single empty leaf-list element",
- ANYDATA_EMPTY_XML,
- Inference.ofDataTreePath(SCHEMA_CONTEXT, LIST_QNAME, LEAF_LIST_QNAME),
- Builders.leafSetBuilder().withNodeIdentifier(LEAF_LIST_NODEID).withChild(
- Builders.leafSetEntryBuilder()
- .withNodeIdentifier(new NodeWithValue<>(LEAF_LIST_QNAME, ""))
- .withValue("").build()).build()),
- Arguments.of("leaf of type empty",
- ANYDATA_EMPTY_XML,
- Inference.ofDataTreePath(SCHEMA_CONTEXT, CONT_QNAME, LEAF_EMPTY_QNAME),
- ImmutableNodes.leafNode(LEAF_EMPTY_NODEID, Empty.value())));
+ return List.of(
+ Arguments.of("container (root level)",
+ ANYDATA_XML,
+ Inference.ofDataTreePath(SCHEMA_CONTEXT, CONT_QNAME),
+ Builders.containerBuilder().withNodeIdentifier(CONT_NODEID).withChild(LEAF_NODE).build()),
+ Arguments.of("container (level 2)",
+ ANYDATA_XML,
+ Inference.ofDataTreePath(SCHEMA_CONTEXT, CONT_QNAME, BAR_QNAME),
+ Builders.containerBuilder().withNodeIdentifier(BAR_NODEID).withChild(LEAF_NODE).build()),
+ Arguments.of("empty container",
+ ANYDATA_EMPTY_XML,
+ Inference.ofDataTreePath(SCHEMA_CONTEXT, CONT_QNAME, BAR_QNAME),
+ ImmutableNodes.containerNode(BAR_NODEID)),
+ Arguments.of("single list element",
+ ANYDATA_XML,
+ Inference.ofDataTreePath(SCHEMA_CONTEXT, LIST_QNAME),
+ Builders.unkeyedListBuilder()
+ .withNodeIdentifier(LIST_NODEID)
+ .withChild(Builders.unkeyedListEntryBuilder()
+ .withNodeIdentifier(LIST_NODEID)
+ .withChild(LEAF_NODE)
+ .build())
+ .build()),
+ Arguments.of("single empty list element",
+ ANYDATA_EMPTY_XML,
+ Inference.ofDataTreePath(SCHEMA_CONTEXT, LIST_QNAME),
+ Builders.unkeyedListBuilder()
+ .withNodeIdentifier(LIST_NODEID)
+ .withChild(Builders.unkeyedListEntryBuilder()
+ .withNodeIdentifier(LIST_NODEID)
+ .build())
+ .build()),
+ Arguments.of("single empty leaf-list element",
+ ANYDATA_EMPTY_XML,
+ Inference.ofDataTreePath(SCHEMA_CONTEXT, LIST_QNAME, LEAF_LIST_QNAME),
+ Builders.leafSetBuilder()
+ .withNodeIdentifier(LEAF_LIST_NODEID)
+ .withChild(Builders.leafSetEntryBuilder()
+ .withNodeIdentifier(new NodeWithValue<>(LEAF_LIST_QNAME, ""))
+ .withValue("")
+ .build())
+ .build()),
+ Arguments.of("leaf of type empty",
+ ANYDATA_EMPTY_XML,
+ Inference.ofDataTreePath(SCHEMA_CONTEXT, CONT_QNAME, LEAF_EMPTY_QNAME),
+ ImmutableNodes.leafNode(LEAF_EMPTY_NODEID, Empty.value())));