use of org.apache.cxf.binding.corba.CorbaStreamable in project cxf by apache.
the class CorbaStreamableTest method testGetStreamableAttributes.
@Test
public void testGetStreamableAttributes() {
QName objName = new QName("object");
QName objIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "float", CorbaConstants.NP_WSDL_CORBA);
TypeCode objTypeCode = orb.get_primitive_tc(TCKind.tk_float);
CorbaPrimitiveHandler obj = new CorbaPrimitiveHandler(objName, objIdlType, objTypeCode, null);
CorbaStreamable streamable = new CorbaStreamableImpl(obj, objName);
TypeCode type = streamable._type();
assertTrue(type.kind().value() == objTypeCode.kind().value());
CorbaPrimitiveHandler storedObj = (CorbaPrimitiveHandler) streamable.getObject();
assertNotNull(storedObj);
int mode = streamable.getMode();
assertTrue(mode == org.omg.CORBA.ARG_OUT.value);
String name = streamable.getName();
assertTrue(name.equals(objName.getLocalPart()));
}
Aggregations