summaryrefslogtreecommitdiffstats
path: root/infra/data-impl/src/test/java/io
diff options
context:
space:
mode:
Diffstat (limited to 'infra/data-impl/src/test/java/io')
-rw-r--r--infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/DataBrokerTest.java18
-rw-r--r--infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapterTest.java4
-rw-r--r--infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/WriteTransactionTest.java7
3 files changed, 7 insertions, 22 deletions
diff --git a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/DataBrokerTest.java b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/DataBrokerTest.java
index 4a0fb11a9..14d32784f 100644
--- a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/DataBrokerTest.java
+++ b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/DataBrokerTest.java
@@ -29,11 +29,9 @@ import java.util.Map;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.TransactionChainListener;
import org.opendaylight.controller.md.sal.dom.api.DOMDataBrokerExtension;
-import org.opendaylight.controller.md.sal.dom.api.DOMDataChangeListener;
import org.opendaylight.controller.md.sal.dom.api.DOMDataReadOnlyTransaction;
import org.opendaylight.controller.md.sal.dom.api.DOMDataReadWriteTransaction;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
@@ -86,14 +84,6 @@ public class DataBrokerTest {
}
@Test(expected = UnsupportedOperationException.class)
- public void testRegisterDataChangeListener() {
- final YangInstanceIdentifier path = mock(YangInstanceIdentifier.class);
- final DOMDataChangeListener listener = mock(DOMDataChangeListener.class);
- broker.registerDataChangeListener(LogicalDatastoreType.OPERATIONAL, path, listener,
- AsyncDataBroker.DataChangeScope.BASE);
- }
-
- @Test(expected = UnsupportedOperationException.class)
public void testCreateTransactionChain() {
final TransactionChainListener listener = mock(TransactionChainListener.class);
broker.createTransactionChain(listener);
@@ -156,14 +146,6 @@ public class DataBrokerTest {
}
@Test(expected = UnsupportedOperationException.class)
- public void testRegisterDataChangeListener() {
- final YangInstanceIdentifier path = mock(YangInstanceIdentifier.class);
- final DOMDataChangeListener listener = mock(DOMDataChangeListener.class);
- broker.registerDataChangeListener(LogicalDatastoreType.OPERATIONAL, path, listener,
- AsyncDataBroker.DataChangeScope.BASE);
- }
-
- @Test(expected = UnsupportedOperationException.class)
public void testCreateTransactionChain() {
final TransactionChainListener listener = mock(TransactionChainListener.class);
broker.createTransactionChain(listener);
diff --git a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapterTest.java b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapterTest.java
index dba707785..487b84d22 100644
--- a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapterTest.java
+++ b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapterTest.java
@@ -35,7 +35,7 @@ import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
@@ -47,7 +47,7 @@ public class PersistingDataTreeAdapterTest {
@Mock
private DataTree delegatingDataTree;
@Mock
- private SchemaService schemaService;
+ private DOMSchemaService schemaService;
@Mock
private DataTreeSnapshot snapshot;
@Mock
diff --git a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/WriteTransactionTest.java b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/WriteTransactionTest.java
index 86521f39b..d0cbb3235 100644
--- a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/WriteTransactionTest.java
+++ b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/WriteTransactionTest.java
@@ -27,6 +27,7 @@ import static org.mockito.MockitoAnnotations.initMocks;
import com.google.common.util.concurrent.CheckedFuture;
import io.fd.honeycomb.data.DataModification;
+import io.fd.honeycomb.translate.TranslationException;
import io.fd.honeycomb.translate.ValidationFailedException;
import org.junit.Before;
import org.junit.Test;
@@ -115,9 +116,11 @@ public class WriteTransactionTest {
}
- @Test(expected = UnsupportedOperationException.class)
- public void testCommit() {
+ @Test
+ public void testCommit() throws TranslationException {
writeTx.commit();
+ verify(configSnapshot).validate();
+ verify(configSnapshot).commit();
}
@Test