Package org.apache.qpid.proton

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


    @Test
    public void testDescribedArray() throws IOException
    {
        TestDecoder d = createDecoder(getBytes("described_array"));
        DescribedType a[] = (DescribedType[]) (d.readArray());
        for (int i = 0; i < 10; ++i)
        {
            assertEquals(Symbol.valueOf("int-array"), a[i].getDescriptor());
            assertEquals(i, a[i].getDescribed());
        }
View Full Code Here


        // int array
        Vector<Integer> ints = new Vector<Integer>();
        for (int i = 0; i < 100; ++i)
            ints.add(new Integer(i));
        assertArrayEquals(ints.toArray(), d.readArray());

        // String array
        String strings[] =
        { "a", "b", "c" };
        assertArrayEquals(strings, d.readArray());
View Full Code Here

        assertArrayEquals(ints.toArray(), d.readArray());

        // String array
        String strings[] =
        { "a", "b", "c" };
        assertArrayEquals(strings, d.readArray());

        // Empty array
        assertArrayEquals(new Integer[0], d.readArray());
    }
View Full Code Here

        String strings[] =
        { "a", "b", "c" };
        assertArrayEquals(strings, d.readArray());

        // Empty array
        assertArrayEquals(new Integer[0], d.readArray());
    }

    @Test
    public void testLists() 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.