Package org.apache.qpid.proton

Examples of org.apache.qpid.proton.TestDecoder.readString()


    @Test
    public void testStrings() throws IOException
    {
        TestDecoder d = createDecoder(getBytes("strings"));
        assertEquals(new Binary("abc\0defg".getBytes("UTF-8")), d.readBinary());
        assertEquals("abcdefg", d.readString());
        assertEquals(Symbol.valueOf("abcdefg"), d.readSymbol());
        assertEquals(new Binary(new byte[0]), d.readBinary());
        assertEquals("", d.readString());
        assertEquals(Symbol.valueOf(""), d.readSymbol());
    }
View Full Code Here


        TestDecoder d = createDecoder(getBytes("strings"));
        assertEquals(new Binary("abc\0defg".getBytes("UTF-8")), d.readBinary());
        assertEquals("abcdefg", d.readString());
        assertEquals(Symbol.valueOf("abcdefg"), d.readSymbol());
        assertEquals(new Binary(new byte[0]), d.readBinary());
        assertEquals("", d.readString());
        assertEquals(Symbol.valueOf(""), d.readSymbol());
    }

    @Test
    public void testDescribed() throws IOException
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.