/** Reset the channel mock and set basic method call expectations */
void resetChannel() {
reset(channel);
expect(channel.newPromise()).andAnswer(new IAnswer<ChannelPromise>() {
@Override
public ChannelPromise answer() throws Throwable {
return new DefaultChannelPromise(channel);
}
}).anyTimes();
eventLoop = new TestEventLoop();
expect(channel.eventLoop()).andReturn(eventLoop).anyTimes();
expect(channel.pipeline()).andReturn(pipeline).anyTimes();
expect(channel.remoteAddress()).andReturn(InetSocketAddress.createUnresolved("1.1.1.1", 80)).anyTimes();
}
OFChannelHandlerVer10Test.java 文件源码
java
阅读 35
收藏 0
点赞 0
评论 0
项目:SDN-Multicast
作者:
评论列表
文章目录