Examples of extract_short()


Examples of org.omg.CORBA.Any.extract_short()

            //
            Any[] anySeq = s1.get_elements();
            TEST(anySeq.length == 8);
            for (i = 0; i < 8; i++) {
                Any p = anySeq[i].extract_any();
                s = p.extract_short();
                TEST(s == (short) i);
            }

            //
            // Test: set_elements()
View Full Code Here

Examples of org.omg.CORBA.Any.extract_short()

        throws Exception
    {
        short testValue = (short) 4711;
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_short(testValue);
        assertEquals(testValue, outAny.extract_short());

        Any inAny = server.bounce_any(outAny);

        assertEquals(testValue, inAny.extract_short());
        assertTrue(outAny.equal(inAny));
View Full Code Here

Examples of org.omg.CORBA.Any.extract_short()

        outAny.insert_short(testValue);
        assertEquals(testValue, outAny.extract_short());

        Any inAny = server.bounce_any(outAny);

        assertEquals(testValue, inAny.extract_short());
        assertTrue(outAny.equal(inAny));
    }

    public void test_short_streamable()
        throws Exception
View Full Code Here

Examples of org.omg.CORBA.Any.extract_short()

        throws Exception
    {
        short testValue = (short) 4711;
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_Streamable(new ShortHolder(testValue));
        assertEquals(testValue, outAny.extract_short());

        Any inAny = server.bounce_any(outAny);

        assertEquals(testValue, inAny.extract_short());
        assertTrue(outAny.equal(inAny));
View Full Code Here

Examples of org.omg.CORBA.Any.extract_short()

        outAny.insert_Streamable(new ShortHolder(testValue));
        assertEquals(testValue, outAny.extract_short());

        Any inAny = server.bounce_any(outAny);

        assertEquals(testValue, inAny.extract_short());
        assertTrue(outAny.equal(inAny));
    }

    public void test_short_stream()
    {
View Full Code Here

Examples of org.omg.CORBA.Any.extract_short()

        Any any = setup.getClientOrb().create_any();
        any.type (setup.getClientOrb().get_primitive_tc(TCKind.tk_short));
        any.create_output_stream().write_short (testValue);
        // don't bounce, because we want to extract from the
        // output stream we just created
        short outValue = any.extract_short();
        assertEquals (testValue, outValue);
    }

    public void test_ushort()
        throws Exception
View Full Code Here

Examples of org.omg.CORBA.Any.extract_short()

        File target = folder.newFile ("foo");

        short testValue = (short) 4711;
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_short(testValue);
        assertEquals(testValue, outAny.extract_short());
        outAny.type ();

        OutputStream s = setup.getClientOrb().create_output_stream ();
        s.write_any (outAny);
View Full Code Here

Examples of org.omg.CORBA.Any.extract_short()

        s.write_any (outAny);

        @SuppressWarnings("resource")
        InputStream i = s.create_input_stream ();
        Any inAny = i.read_any ();
        assertEquals(testValue, inAny.extract_short());
        assertTrue(outAny.equal(inAny));

        FileUtils.writeByteArrayToFile(target, ((CDROutputStream)s).getBufferCopy());
        assertTrue(FileUtils.sizeOf(target) > 0);
        byte[] messageByte = FileUtils.readFileToByteArray(target);
View Full Code Here

Examples of org.omg.CORBA.Any.extract_short()

        byte[] messageByte = FileUtils.readFileToByteArray(target);

        i = new org.jacorb.orb.CDRInputStream(setup.getClientOrb(), messageByte);
        inAny = i.read_any ();

        assertEquals(testValue, inAny.extract_short());
        assertTrue(outAny.equal(inAny));
    }

    @Test
    public void test_empty()
View Full Code Here

Examples of org.omg.CORBA.Any.extract_short()

        throws Exception
    {
        short testValue = (short) 4711;
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_short(testValue);
        assertEquals(testValue, outAny.extract_short());

        Any inAny = server.bounce_any(outAny);

        assertEquals(testValue, inAny.extract_short());
        assertTrue(outAny.equal(inAny));
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.