X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fimpl%2Ftest%2FListInsertionDataChangeListenerTest.java;h=0bc73824bf0cabe0691823f8b733e44317e581d2;hp=05bc857969005bfab5a35f9627970a1434eb1bc6;hb=8a8de0bffed5b6c9b4ac821dfafa7e944c70ef9d;hpb=cb210bea2ab44aa2922ed86232c9db9a10452fc0 diff --git a/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/ListInsertionDataChangeListenerTest.java b/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/ListInsertionDataChangeListenerTest.java index 05bc857969..0bc73824bf 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/ListInsertionDataChangeListenerTest.java +++ b/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/ListInsertionDataChangeListenerTest.java @@ -16,8 +16,8 @@ import static org.opendaylight.controller.md.sal.test.model.util.ListsBindingUti import static org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.top; import static org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.topLevelList; +import org.junit.Before; import org.junit.Test; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction; import org.opendaylight.controller.md.sal.binding.api.WriteTransaction; import org.opendaylight.controller.md.sal.binding.test.AbstractDataChangeListenerTest; @@ -29,12 +29,9 @@ import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** - * * This testsuite tests explanation for data change scope and data modifications * which were described in * https://lists.opendaylight.org/pipermail/controller-dev/2014-July/005541.html - * - * */ public class ListInsertionDataChangeListenerTest extends AbstractDataChangeListenerTest{ @@ -43,12 +40,11 @@ public class ListInsertionDataChangeListenerTest extends AbstractDataChangeListe private static final InstanceIdentifier TOP_FOO = TOP.child(TopLevelList.class, TOP_FOO_KEY); private static final InstanceIdentifier TOP_BAR = TOP.child(TopLevelList.class, TOP_BAR_KEY); - - @Override - protected void setupWithDataBroker(final DataBroker dataBroker) { - WriteTransaction initialTx = dataBroker.newWriteOnlyTransaction(); + @Before + public void setupWithDataBroker() { + WriteTransaction initialTx = getDataBroker().newWriteOnlyTransaction(); initialTx.put(CONFIGURATION, TOP, top(topLevelList(TOP_FOO_KEY))); - assertCommit(initialTx.commit()); + assertCommit(initialTx.submit()); } @Test @@ -60,7 +56,7 @@ public class ListInsertionDataChangeListenerTest extends AbstractDataChangeListe ReadWriteTransaction writeTx = getDataBroker().newReadWriteTransaction(); writeTx.put(CONFIGURATION, TOP, top(topLevelList(TOP_BAR_KEY))); - assertCommit(writeTx.commit()); + assertCommit(writeTx.submit()); AsyncDataChangeEvent, DataObject> top = topListener.event(); AsyncDataChangeEvent, DataObject> all = allListener.event(); AsyncDataChangeEvent, DataObject> foo = fooListener.event(); @@ -115,7 +111,7 @@ public class ListInsertionDataChangeListenerTest extends AbstractDataChangeListe ReadWriteTransaction writeTx = getDataBroker().newReadWriteTransaction(); writeTx.merge(CONFIGURATION, TOP, top(topLevelList(TOP_BAR_KEY))); - assertCommit(writeTx.commit()); + assertCommit(writeTx.submit()); verifyBarOnlyAdded(topListener,allListener,fooListener,barListener); } @@ -129,7 +125,7 @@ public class ListInsertionDataChangeListenerTest extends AbstractDataChangeListe ReadWriteTransaction writeTx = getDataBroker().newReadWriteTransaction(); writeTx.put(CONFIGURATION, TOP_BAR, topLevelList(TOP_BAR_KEY)); - assertCommit(writeTx.commit()); + assertCommit(writeTx.submit()); verifyBarOnlyAdded(topListener,allListener,fooListener,barListener); } @@ -143,7 +139,7 @@ public class ListInsertionDataChangeListenerTest extends AbstractDataChangeListe ReadWriteTransaction writeTx = getDataBroker().newReadWriteTransaction(); writeTx.merge(CONFIGURATION, TOP_BAR, topLevelList(TOP_BAR_KEY)); - assertCommit(writeTx.commit()); + assertCommit(writeTx.submit()); verifyBarOnlyAdded(topListener,allListener,fooListener,barListener); }