import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
writeIntoMapEntry();
}
- private void writeContributors() {
+ private static void writeContributors() {
final ContainerSchemaNode contributorContSchemaNode = (ContainerSchemaNode) valModule
.getDataChildByName(odlContributor);
}
- private void writeIntoMapEntry() {
+ private static void writeIntoMapEntry() {
final Map<QName, Object> keys = new HashMap<QName, Object>();
keys.put(name, "New Project");
}
- private void writeMapEntry() {
+ private static void writeMapEntry() {
final Map<QName, Object> keys = new HashMap<QName, Object>();
keys.put(name, "New Project");
}
- private void write() {
+ private static void write() {
final ContainerSchemaNode contributorContSchemaNode = (ContainerSchemaNode) valModule
.getDataChildByName(odlContributor);
assertTrue(exception);
}
- private void write2() {
+ private static void write2() {
final ContainerSchemaNode odlCon = (ContainerSchemaNode) valModule
.getDataChildByName(odl);
con3);
writeModification.write(con3Path, con3Node);
- final LeafSetNode leafListNode = createLeafRefLeafListNode();
+ final LeafSetNode<?> leafListNode = createLeafRefLeafListNode();
final YangInstanceIdentifier leafListPath = YangInstanceIdentifier.of(odl)
.node(leafrefLeafList);
writeModification.write(leafListPath, leafListNode);
}
- private LeafSetNode createLeafRefLeafListNode() {
+ private static LeafSetNode<?> createLeafRefLeafListNode() {
final ListNodeBuilder<Object, LeafSetEntryNode<Object>> leafSetBuilder = Builders
.leafSetBuilder();
return leafSetBuilder.build();
}
- private ContainerNode createCon3Node() {
+ private static ContainerNode createCon3Node() {
final CollectionNodeBuilder<MapEntryNode, MapNode> mapBuilder = Builders
.mapBuilder();
return containerBuilder.build();
}
- private MapEntryNode createList3Entry(final String kVal, final String l3Val1,
+ private static MapEntryNode createList3Entry(final String kVal, final String l3Val1,
final String l3Val2, final String l3Val3) {
final DataContainerNodeAttrBuilder<NodeIdentifierWithPredicates, MapEntryNode> mapEntryBuilder = Builders
.mapEntryBuilder();
return mapEntryBuilder.build();
}
- private LeafSetEntryNode<Object> createLeafSetEntry(final QName qname, final String val) {
+ private static LeafSetEntryNode<Object> createLeafSetEntry(final QName qname, final String val) {
final NormalizedNodeAttrBuilder<NodeWithValue, Object, LeafSetEntryNode<Object>> leafSetEntryBuilder = Builders
.leafSetEntryBuilder();
leafSetEntryBuilder.withNodeIdentifier(new NodeWithValue(qname, val));
return leafSetEntryBuilder.build();
}
- private ChoiceNode createChoiceNode() {
+ private static ChoiceNode createChoiceNode() {
final CollectionNodeBuilder<MapEntryNode, MapNode> listInChoiceBuilder = Builders
.mapBuilder();
return choiceBuilder.build();
}
- private MapEntryNode createListInChoiceEntry(final String keyVal,
+ private static MapEntryNode createListInChoiceEntry(final String keyVal,
final String leafrefInChoiceVal, final String leafrefInChoiceToChoiceVal) {
final DataContainerNodeAttrBuilder<NodeIdentifierWithPredicates, MapEntryNode> mapEntryBuilder = Builders
return mapEntryBuilder.build();
}
- private void delete() {
+ private static void delete() {
final YangInstanceIdentifier contributorPath = YangInstanceIdentifier
.of(odlContributor);
}
- private ContainerNode createContributorContainer(
+ private static ContainerNode createContributorContainer(
final ContainerSchemaNode contributorContSchemaNode) {
final ListSchemaNode contributorListSchemaNode = (ListSchemaNode) contributorContSchemaNode
}
- private MapNode createContributorList(
+ private static MapNode createContributorList(
final ListSchemaNode contributorListSchemaNode) {
final CollectionNodeBuilder<MapEntryNode, MapNode> contributorMapBldr = Builders
}
- private MapEntryNode createContributorListEntry(final String loginVal,
+ private static MapEntryNode createContributorListEntry(final String loginVal,
final String contributorNameVal, final String odlProjectNameVal,
final String odlProjectDescVal, final ListSchemaNode contributorListSchemaNode) {
return projMapEntry;
}
- private ContainerNode createBasicContributorContainer(
+ private static ContainerNode createBasicContributorContainer(
final ContainerSchemaNode contributorContSchemaNode) {
final ListSchemaNode contributorListSchemaNode = (ListSchemaNode) contributorContSchemaNode
}
- private MapNode createBasicContributorList(
+ private static MapNode createBasicContributorList(
final ListSchemaNode contributorListSchemaNode) {
final CollectionNodeBuilder<MapEntryNode, MapNode> contributorMapBldr = Builders
final MapNode contributorMap = contributorMapBldr.build();
return contributorMap;
-
}
-
}
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-
import com.google.common.base.Optional;
import java.io.InputStream;
import java.util.ArrayList;
InMemoryDataTreeSnapshot snapshotAfterCommit = inMemoryDataTree.takeSnapshot();
Optional<NormalizedNode<?, ?>> minMaxListRead = snapshotAfterCommit.readNode(MIN_MAX_LIST_PATH);
assertTrue(minMaxListRead.isPresent());
- assertTrue(((NormalizedNodeContainer) minMaxListRead.get()).getValue().size() == 2);
+ assertTrue(((NormalizedNodeContainer<?, ?, ?>) minMaxListRead.get()).getValue().size() == 2);
modificationTree = inMemoryDataTree.takeSnapshot().newModification();
modificationTree.write(gooPath, gooEntryNode);
snapshotAfterCommit = inMemoryDataTree.takeSnapshot();
minMaxListRead = snapshotAfterCommit.readNode(MIN_MAX_LIST_PATH);
assertTrue(minMaxListRead.isPresent());
- assertTrue(((NormalizedNodeContainer) minMaxListRead.get()).getValue().size() == 3);
+ assertTrue(((NormalizedNodeContainer<?, ?, ?>) minMaxListRead.get()).getValue().size() == 3);
modificationTree = inMemoryDataTree.takeSnapshot().newModification();
final InMemoryDataTreeSnapshot snapshotAfterCommit = inMemoryDataTree.takeSnapshot();
final Optional<NormalizedNode<?, ?>> masterContainer = snapshotAfterCommit.readNode(MASTER_CONTAINER_PATH);
assertTrue(masterContainer.isPresent());
- final Optional<NormalizedNodeContainer> leafList = ((NormalizedNodeContainer) masterContainer.get()).getChild(
+ final Optional<NormalizedNodeContainer<?, ?, ?>> leafList = ((NormalizedNodeContainer) masterContainer.get()).getChild(
new YangInstanceIdentifier.NodeIdentifier(MIN_MAX_LEAF_LIST_QNAME));
assertTrue(leafList.isPresent());
assertTrue(leafList.get().getValue().size() == 2);