2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.dom.store.inmemory;
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertNotNull;
12 import static org.opendaylight.mdsal.dom.store.inmemory.TestUtils.DOM_DATA_TREE_IDENTIFIER;
13 import static org.opendaylight.mdsal.dom.store.inmemory.TestUtils.DOM_DATA_TREE_SHARD_PRODUCER;
14 import static org.opendaylight.mdsal.dom.store.inmemory.TestUtils.PATH_ARGUMENT;
15 import static org.opendaylight.mdsal.dom.store.inmemory.TestUtils.WRITEABLE_MODIFICATION_NODE;
18 import org.junit.Test;
20 public class ModificationContextNodeBuilderTest extends ModificationContextNodeBuilder {
23 public void basicTest() throws Exception {
24 final ForeignShardModificationContext foreignShardModificationContext =
25 new ForeignShardModificationContext(DOM_DATA_TREE_IDENTIFIER, DOM_DATA_TREE_SHARD_PRODUCER);
26 final WriteableSubshardBoundaryNode writeableSubshardBoundaryNode =
27 WriteableSubshardBoundaryNode.from(foreignShardModificationContext);
28 super.addBoundary(PATH_ARGUMENT, writeableSubshardBoundaryNode);
30 assertNotNull(super.getInterior(PATH_ARGUMENT));
31 assertEquals(WRITEABLE_MODIFICATION_NODE, super.build());
35 WriteableModificationNode build(Map children) {
36 return WRITEABLE_MODIFICATION_NODE;