summaryrefslogtreecommitdiffstats
path: root/v3po/impl/src/test/java/org
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-04-10 22:06:36 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-04-12 10:59:14 +0200
commitc806dc87185ee3a994685561ea024cad45210036 (patch)
tree6f7cc3fed50302285ee9cd175b2a08af924933de /v3po/impl/src/test/java/org
parentba4b79f78d5cc7aa65660775b52f8a58eefc2472 (diff)
HONEYCOMB-34: Configurable serializer dependency
Change-Id: I05cb7836ec4a379f7617710a6c6f64c3541ff0c9 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/impl/src/test/java/org')
-rw-r--r--v3po/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModuleTest.java9
1 files changed, 9 insertions, 0 deletions
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);