diff options
Diffstat (limited to 'v3po/impl/src/test')
2 files changed, 13 insertions, 1 deletions
diff --git a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerInitializationProviderTest.java b/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerInitializationProviderTest.java index d8628f2bf..eb2349fb2 100644 --- a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerInitializationProviderTest.java +++ b/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerInitializationProviderTest.java @@ -36,6 +36,7 @@ import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.api.WriteTransaction; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; +import org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class VppDataBrokerInitializationProviderTest { @@ -48,6 +49,8 @@ public class VppDataBrokerInitializationProviderTest { private ReaderRegistry readerRegistry; @Mock private WriterRegistry writerRegistry; + @Mock + private BindingNormalizedNodeSerializer serializer; private VppDataBrokerInitializationProvider provider; @@ -56,7 +59,7 @@ public class VppDataBrokerInitializationProviderTest { public void setUp() throws Exception { initMocks(this); doReturn(writeTx).when(bindingBroker).newWriteOnlyTransaction(); - provider = new VppDataBrokerInitializationProvider(bindingBroker, readerRegistry, writerRegistry); + provider = new VppDataBrokerInitializationProvider(bindingBroker, readerRegistry, writerRegistry, serializer); } @Test diff --git a/v3po/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModuleTest.java b/v3po/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModuleTest.java index 74d36bb9d..6eef488cc 100644 --- a/v3po/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModuleTest.java +++ b/v3po/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModuleTest.java @@ -22,12 +22,15 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import io.fd.honeycomb.v3po.impl.V3poProvider; +import io.fd.honeycomb.v3po.translate.read.ReaderRegistry; +import io.fd.honeycomb.v3po.translate.write.WriterRegistry; import javax.management.ObjectName; import org.junit.Test; import org.opendaylight.controller.config.api.DependencyResolver; import org.opendaylight.controller.config.api.JmxAttribute; import org.opendaylight.controller.config.api.ModuleIdentifier; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; +import org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer; public class V3poModuleTest { @Test @@ -50,6 +53,12 @@ public class V3poModuleTest { final org.opendaylight.controller.sal.core.api.Broker domBroker = mock(org.opendaylight.controller.sal.core.api.Broker.class); when(dependencyResolver.resolveInstance(eq(org.opendaylight.controller.sal.core.api.Broker.class), any(ObjectName.class), any(JmxAttribute.class))) .thenReturn(domBroker); + when(dependencyResolver.resolveInstance(eq(ReaderRegistry.class), any(ObjectName.class), any(JmxAttribute.class))) + .thenReturn(mock(ReaderRegistry.class)); + when(dependencyResolver.resolveInstance(eq(WriterRegistry.class), any(ObjectName.class), any(JmxAttribute.class))) + .thenReturn(mock(WriterRegistry.class)); + when(dependencyResolver.resolveInstance(eq(BindingNormalizedNodeSerializer.class), any(ObjectName.class), any(JmxAttribute.class))) + .thenReturn(mock(BindingNormalizedNodeSerializer.class)); // create instance of module with injected mocks V3poModule module = new V3poModule(mock(ModuleIdentifier.class), dependencyResolver); |