Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
BUG-2459: centralize codec allocation
[controller.git]
/
opendaylight
/
netconf
/
netconf-client
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
netconf
/
client
/
NetconfClientSessionTest.java
diff --git
a/opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionTest.java
b/opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionTest.java
index 850ad55fc61314481cde821ff575bee9789a3f86..e11be554d0df948700dc37b8650db0e3c5722172 100644
(file)
--- a/
opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionTest.java
+++ b/
opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionTest.java
@@
-12,7
+12,6
@@
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
-
import com.google.common.collect.Lists;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;
import com.google.common.collect.Lists;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;
@@
-24,6
+23,8
@@
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.opendaylight.controller.netconf.nettyutil.handler.NetconfEXICodec;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.opendaylight.controller.netconf.nettyutil.handler.NetconfEXICodec;
+import org.opendaylight.controller.netconf.nettyutil.handler.NetconfEXIToMessageDecoder;
+import org.opendaylight.controller.netconf.nettyutil.handler.NetconfMessageToEXIEncoder;
import org.openexi.proc.common.EXIOptions;
public class NetconfClientSessionTest {
import org.openexi.proc.common.EXIOptions;
public class NetconfClientSessionTest {
@@
-53,7
+54,9
@@
public class NetconfClientSessionTest {
Mockito.doReturn("").when(channelHandler).toString();
NetconfClientSession session = new NetconfClientSession(sessionListener, channel, sessId, caps);
Mockito.doReturn("").when(channelHandler).toString();
NetconfClientSession session = new NetconfClientSession(sessionListener, channel, sessId, caps);
- session.addExiHandlers(codec);
+ final NetconfMessageToEXIEncoder exiEncoder = new NetconfMessageToEXIEncoder(codec);
+ final NetconfEXIToMessageDecoder exiDecoder = new NetconfEXIToMessageDecoder(codec);
+ session.addExiHandlers(exiDecoder, exiEncoder);
session.stopExiCommunication();
assertEquals(caps, session.getServerCapabilities());
session.stopExiCommunication();
assertEquals(caps, session.getServerCapabilities());