}
private static void doTest(Object object) throws TestBridgeException {
XTestFactory xTestFactory = (XTestFactory)UnoRuntime.queryInterface(XTestFactory.class, object);
XCallMe local_xCallMe = new CallMe_Impl();
XCallMe remote_xCallMe = xTestFactory.createCallMe();
System.err.println( "Testing exception local ...");
testException(local_xCallMe);
System.err.println("Testing exception remote ...");
testException(remote_xCallMe);
//--------------------
// Test attributes
//----------------------
String string = "dum didel dum dideldei";
local_xCallMe.setsAttribute(string);
System.err.print("local callme get/set attribute: ");
if(local_xCallMe.getsAttribute().equals(string))
System.err.println("passed");
else
System.err.println("failure");
remote_xCallMe.setsAttribute(string);
System.err.print("remote callme get/set attribute: ");
if(remote_xCallMe.getsAttribute().equals(string))
System.err.println("passed");
else
System.err.println("failure");
//-------------------
// Performance test
//-------------------
testPerformance(remote_xCallMe , local_xCallMe);
//----------------
// Test sequence
//----------------
testSequenceOfCalls(remote_xCallMe);
// test triple to check if transporting the same interface multiple
// times causes any problems
XInterfaceTest rRTest = xTestFactory.createInterfaceTest();
XInterfaceTest rRTest2 = xTestFactory.createInterfaceTest();
XInterfaceTest rRTest3 = xTestFactory.createInterfaceTest();
rRTest.setIn(remote_xCallMe);
rRTest2.setIn(remote_xCallMe);
rRTest3.setIn(remote_xCallMe);
if(!UnoRuntime.areSame(rRTest2.get(), remote_xCallMe))
System.err.println("remote set/get interface failure");
rRTest.setIn(local_xCallMe);
rRTest2.setIn(local_xCallMe);
rRTest3.setIn(local_xCallMe);
if(!UnoRuntime.areSame(rRTest2.get(), local_xCallMe))
System.err.println("local set/get interface failure");
XCallMe r[] = new XCallMe[] {remote_xCallMe};
rRTest.setIn(remote_xCallMe);
rRTest.setInOut(r);
if(UnoRuntime.areSame(local_xCallMe, r[0]))
System.err.println("local setInOut local == remote callme failure");