use of org.webpieces.nio.api.testutil.MockDataHandler in project webpieces by deanhiller.
the class TryRealConnection method xxxtestRealConnection.
public void xxxtestRealConnection() throws Exception {
MockObject mockConnect = MockObjectFactory.createMock(ConnectionCallback.class);
Settings h = new Settings(new MockSSLEngineFactory(), null);
TCPChannel channel = chanMgr.createTCPChannel("testId", h);
channel.bind(loopBackAddr);
log.trace("aaaaa");
MockObject handler = new MockDataHandler();
channel.registerForReads((DataListener) handler);
// InetAddress host = InetAddress.getByName("shell.sourceforge.net");
InetAddress host = InetAddress.getByName("www.xsoftware.biz");
InetSocketAddress addr = new InetSocketAddress(host, 22);
channel.oldConnect(addr, (ConnectionCallback) mockConnect);
mockConnect.expect("connected");
handler.addIgnore("getBuffer");
//CalledMethod method =
handler.expect("incomingData");
// ByteBuffer b = (ByteBuffer)method.getAllParams()[1];
}
Aggregations