2 * Copyright (c) 2017 Pantheon Technologies s.r.o. 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
9 package org.opendaylight.mdsal.binding.javav2.dom.adapter.test;
11 import org.junit.Ignore;
12 import org.junit.Test;
13 import org.opendaylight.mdsal.binding.javav2.api.WriteTransaction;
14 import org.opendaylight.mdsal.binding.javav2.spec.base.InstanceIdentifier;
15 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
16 import org.opendaylight.mdsal.common.api.TransactionCommitFailedException;
17 import org.opendaylight.mdsal.gen.javav2.urn.test.rev170627.data.MyCont;
18 import org.opendaylight.mdsal.gen.javav2.urn.test.rev170627.dto.MyContBuilder;
20 public class BasicLeafValueTest extends AbstractDataBrokerTest {
22 private static final InstanceIdentifier<MyCont> MY_CONT_NODE_PATH
23 = InstanceIdentifier.create(MyCont.class);
27 public void testMyContLeafNode() throws TransactionCommitFailedException {
28 final WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction();
29 final MyContBuilder hello = new MyContBuilder().setMyLeaf("hello");
30 writeTx.put(LogicalDatastoreType.OPERATIONAL, MY_CONT_NODE_PATH, hello.build());
31 writeTx.submit().checkedGet();