Package kg.apc.emulators

Examples of kg.apc.emulators.SocketEmulatorInputStream


     */
    @Test
    public void testWrite_OutputStream_InputStream() throws IOException {
        System.out.println("write");
        SocketEmulatorOutputStream os = new SocketEmulatorOutputStream();
        SocketEmulatorInputStream is = new SocketEmulatorInputStream();
        InfiniteGetTCPClientImpl instance = new InfiniteGetTCPClientImpl();
        instance.write(os, is);
    }
View Full Code Here


     * Test of read method, of class InfiniteGetTCPClientImpl.
     */
    @Test
    public void testRead() {
        System.out.println("read");
        SocketEmulatorInputStream in = new SocketEmulatorInputStream();
        StringBuilder str=new StringBuilder();
        for(int i=0; i<6000; i++)
        {
            str.append('0');
        }
        in.setBytesToRead(str.toString());
        InfiniteGetTCPClientImpl instance = new InfiniteGetTCPClientImpl();
        String result = instance.read(in);
        assertEquals(5120, result.length());
        String result2 = instance.read(in);
        assertEquals(880, result2.length());
View Full Code Here

TOP

Related Classes of kg.apc.emulators.SocketEmulatorInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.