X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-it%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Ftest%2Fsal%2Fbinding%2Fit%2FNoficationTest.java;h=2f86ee4cc2e9e34c4db55b803b565f090c7962b5;hb=edb3b76df1fa27594d5f9ee368d737576b0b38f8;hp=6fec18033f8feeed2df5dd7f040d2ddf622d63ad;hpb=8b84c5a210d5bf688fde0eb0db1b7f21f78a4f0b;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/NoficationTest.java b/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/NoficationTest.java index 6fec18033f..2f86ee4cc2 100644 --- a/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/NoficationTest.java +++ b/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/NoficationTest.java @@ -5,13 +5,16 @@ import static org.junit.Assert.assertNotNull; import java.math.BigInteger; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import org.junit.Before; import org.junit.Test; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext; +import org.opendaylight.controller.sal.binding.api.BindingAwareProvider.ProviderFunctionality; import org.opendaylight.controller.sal.binding.api.BindingAwareConsumer; +import org.opendaylight.controller.sal.binding.api.BindingAwareProvider; import org.opendaylight.controller.sal.binding.api.NotificationProviderService; import org.opendaylight.controller.sal.binding.api.NotificationService; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowAdded; @@ -24,6 +27,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalF import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SwitchFlowRemoved; import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.NotificationListener; +import org.opendaylight.yangtools.yang.binding.RpcService; public class NoficationTest extends AbstractTest { @@ -95,16 +99,36 @@ public class NoficationTest extends AbstractTest { * The registration of the Consumer 2. SalFlowListener is registered * registered as notification listener. */ - BindingAwareConsumer consumer2 = new BindingAwareConsumer() { + BindingAwareProvider provider = new BindingAwareProvider() { + @Override - public void onSessionInitialized(ConsumerContext session) { + public void onSessionInitiated(ProviderContext session) { listener2Reg = session.getSALService(NotificationProviderService.class).registerNotificationListener( listener2); } + + @Override + public void onSessionInitialized(ConsumerContext session) { + // TODO Auto-generated method stub + + } + + @Override + public Collection getImplementations() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Collection getFunctionality() { + // TODO Auto-generated method stub + return null; + } + }; // registerConsumer method calls onSessionInitialized method above - broker.registerConsumer(consumer2, getBundleContext()); + broker.registerProvider(provider, getBundleContext()); /** * 3 notifications are published