Package org.omg.CORBA

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


            TEST(d1.get_octet() == (byte) 255);
            d1.insert_octet((byte) 1);
            TEST(d1.get_octet() == (byte) 1);

            av = d1.to_any();
            byte octetVal = av.extract_octet();
            TEST(octetVal == (byte) 1);

            any.insert_octet((byte) 1);
            d2 = factory.create_dyn_any(any);
            TEST(d1.equal(d2));
View Full Code Here


        any.insert_octet(octetValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:unsignedByte";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_octet);
        byte octetResult = result.extract_octet();
        assertTrue(octetResult == octetValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));

        short shortValue = (short)-123;
View Full Code Here

        d1.insert_octet((byte) 1);
        TEST(d1.get_octet() == (byte) 1);

        av = d1.to_any();

        byte octetVal = av.extract_octet();
        TEST(octetVal == (byte) 1);

        any.insert_octet((byte) 1);
        d2 = factory.create_dyn_any(any);
        TEST(d1.equal(d2));
View Full Code Here

        any.insert_octet(octetValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:unsignedByte";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_octet);
        byte octetResult = result.extract_octet();
        assertTrue(octetResult == octetValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));

        short shortValue = (short)-123;
View Full Code Here

            TEST(d1.get_octet() == (byte) 255);
            d1.insert_octet((byte) 1);
            TEST(d1.get_octet() == (byte) 1);

            av = d1.to_any();
            byte octetVal = av.extract_octet();
            TEST(octetVal == (byte) 1);

            any.insert_octet((byte) 1);
            d2 = factory.create_dyn_any(any);
            TEST(d1.equal(d2));
View Full Code Here

    {
        byte testValue = (byte) 0xFF;

        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_octet(testValue);
        assertEquals(testValue, outAny.extract_octet());

        Any inAny = server.bounce_any(outAny);

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

        outAny.insert_octet(testValue);
        assertEquals(testValue, outAny.extract_octet());

        Any inAny = server.bounce_any(outAny);

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

    public void test_octet_streamable()
        throws Exception
View Full Code Here

    {
        byte testValue = (byte) 0xFF;

        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_Streamable(new ByteHolder(testValue));
        assertEquals(testValue, outAny.extract_octet());

        Any inAny = server.bounce_any(outAny);

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

        outAny.insert_Streamable(new ByteHolder(testValue));
        assertEquals(testValue, outAny.extract_octet());

        Any inAny = server.bounce_any(outAny);

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

    public void test_octet_stream()
    {
View Full Code Here

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

    public void test_any()
        throws Exception
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.