@Test public void testConnectThrowsSocketException() throws Throwable { Socket socket = new Socket(); X25Channel x25Channel = new X25Channel(); socket.close(); try { x25Channel.connect(socket); fail("Expected SocketException to be thrown"); } catch (SocketException ex) { assertEquals(SocketException.class, ex.getClass(), "ex.getClass()"); assertNull(x25Channel.reader, "x25Channel.reader"); assertEquals("org.jpos.iso.channel.X25Channel", x25Channel.getOriginalRealm(), "x25Channel.getOriginalRealm()"); assertEquals(3, x25Channel.getCounters().length, "x25Channel.getCounters().length"); assertNull(x25Channel.getRealm(), "x25Channel.getRealm()"); assertSame(socket, x25Channel.getSocket(), "x25Channel.getSocket()"); assertFalse(x25Channel.isConnected(), "x25Channel.isConnected()"); assertNull(x25Channel.getLogger(), "x25Channel.getLogger()"); assertNull(socket.getChannel(), "socket.getChannel()"); } }
protected void connect (Socket socket) throws IOException { super.connect (socket); reader = new BufferedReader (new InputStreamReader (serverIn)); }
X25Channel extends BaseChannel { protected void connect (Socket socket) throws IOException { super.connect (socket); reader = new BufferedReader (new InputStreamReader (serverIn)); } }
X25Channel extends BaseChannel { protected void connect (Socket socket) throws IOException { super.connect (socket); reader = new BufferedReader (new InputStreamReader (serverIn)); } X25Channel();  X25Channel(String host, int port, ISOPackager p);  X25Channel(ISOPackager p);  X25Channel(ISOPackager p, ServerSocket serverSocket); }
X25Channel extends BaseChannel { protected void connect (Socket socket) throws IOException { super.connect (socket); reader = new BufferedReader (new InputStreamReader (serverIn)); } X25Channel();  X25Channel(String host, int port, ISOPackager p);  X25Channel(ISOPackager p);  X25Channel(ISOPackager p, ServerSocket serverSocket); void disconnect(); void setHeader(byte[] header); void setHeader(String header); byte[] getHeader(); }
X25Channel extends BaseChannel { protected void connect (Socket socket) throws IOException { super.connect (socket); reader = new BufferedReader (new InputStreamReader (serverIn)); } X25Channel();  X25Channel(String host, int port, ISOPackager p);  X25Channel(ISOPackager p);  X25Channel(ISOPackager p, ServerSocket serverSocket); void disconnect(); void setHeader(byte[] header); void setHeader(String header); byte[] getHeader();  }