Search in sources :

Example 6 with BasicCapability

use of org.opendaylight.netconf.api.capability.BasicCapability in project netconf by opendaylight.

the class NetconfSessionMonitoringServiceTest method testListeners.

@Test
public void testListeners() {
    monitoringService.onSessionUp(sessionMock1);
    HashSet<Capability> added = new HashSet<>();
    added.add(new BasicCapability("toAdd"));
    monitoringService.onSessionDown(sessionMock1);
    verify(listener).onSessionStarted(any());
    verify(listener).onSessionEnded(any());
}
Also used : Capability(org.opendaylight.netconf.api.capability.Capability) BasicCapability(org.opendaylight.netconf.api.capability.BasicCapability) BasicCapability(org.opendaylight.netconf.api.capability.BasicCapability) HashSet(java.util.HashSet) Test(org.junit.Test)

Aggregations

BasicCapability (org.opendaylight.netconf.api.capability.BasicCapability)6 HashSet (java.util.HashSet)4 Capability (org.opendaylight.netconf.api.capability.Capability)4 YangModuleCapability (org.opendaylight.netconf.api.capability.YangModuleCapability)4 Test (org.junit.Test)3 Before (org.junit.Before)2 Collections2 (com.google.common.collect.Collections2)1 Futures (com.google.common.util.concurrent.Futures)1 ThreadFactoryBuilder (com.google.common.util.concurrent.ThreadFactoryBuilder)1 SuppressFBWarnings (edu.umd.cs.findbugs.annotations.SuppressFBWarnings)1 Channel (io.netty.channel.Channel)1 ChannelFuture (io.netty.channel.ChannelFuture)1 LocalAddress (io.netty.channel.local.LocalAddress)1 NioEventLoopGroup (io.netty.channel.nio.NioEventLoopGroup)1 HashedWheelTimer (io.netty.util.HashedWheelTimer)1 Closeable (java.io.Closeable)1 IOException (java.io.IOException)1 BindException (java.net.BindException)1 Inet4Address (java.net.Inet4Address)1 InetSocketAddress (java.net.InetSocketAddress)1