Package org.omg.CORBA

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


        int ulongValue = 12345;
        any.insert_ulong(ulongValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:unsignedInt";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_ulong);
        int ulongResult = result.extract_ulong();
        assertTrue(ulongResult == ulongValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
View Full Code Here


        long longlongValue = -123456789;
        any.insert_longlong(longlongValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:long";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_longlong);
        long longlongResult = result.extract_longlong();
        assertTrue(longlongResult == longlongValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
View Full Code Here

        long ulonglongValue = 123456789;
        any.insert_ulonglong(ulonglongValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:unsignedLong";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_ulonglong);
        long ulonglongResult = result.extract_ulonglong();
        assertTrue(ulonglongResult == ulonglongValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
View Full Code Here

        double doubleValue = 1234.56;
        any.insert_double(doubleValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:double";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_double);
        double doubleResult = result.extract_double();
        assertTrue(doubleResult == doubleValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
View Full Code Here

        float floatValue = 123456.78f;
        any.insert_float(floatValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:float";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_float);
        float floatResult = result.extract_float();
        assertTrue(floatResult == floatValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
       
View Full Code Here

        String stringValue = "test string";
        any.insert_string(stringValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:string";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_string);
        String stringResult = result.extract_string();
        assertTrue(stringResult == stringValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
View Full Code Here

        String wstringValue = "test wstring";
        any.insert_wstring(wstringValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:string";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_wstring);
        String wstringResult = result.extract_wstring();
        assertTrue(wstringResult == wstringValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
    }
View Full Code Here

        resultValue = anyHandler.getValueData();
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultValue.equals(value));       
        assertTrue(resultSchemaType.equals(schemaType));
        resultAny = anyHandler.getValue();
        assertTrue(resultAny.type().kind().value() == TCKind._tk_boolean);

        value = "7";
        schemaType = "xs:byte";
        anyHandler.setValueFromData(orb, value, schemaType);
        resultValue = anyHandler.getValueData();
View Full Code Here

        resultValue = anyHandler.getValueData();
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultValue.equals(value));
        assertTrue(resultSchemaType.equals(schemaType));
        resultAny = anyHandler.getValue();
        assertTrue(resultAny.type().kind().value() == TCKind._tk_char);

        value = "1234.56";
        schemaType = "xs:double";
        anyHandler.setValueFromData(orb, value, schemaType);
        resultValue = anyHandler.getValueData();
View Full Code Here

        resultValue = anyHandler.getValueData();
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultValue.equals(value));
        assertTrue(resultSchemaType.equals(schemaType));
        resultAny = anyHandler.getValue();
        assertTrue(resultAny.type().kind().value() == TCKind._tk_double);

        value = "987654.321";
        schemaType = "xs:float";
        anyHandler.setValueFromData(orb, value, schemaType);
        resultSchemaType = anyHandler.getSchemaType();
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.