Package test

Examples of test.XCallMe


  }

  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");
View Full Code Here



public class TestFactory_Impl implements XTestFactory {

    public XCallMe createCallMe() throws com.sun.star.uno.RuntimeException {
    XCallMe xCallMe = new CallMe_Impl();

    System.err.println("#### TestFactory_Impl.createCallMe:" + UnoRuntime.generateOid(xCallMe));

    return xCallMe;
  }
View Full Code Here

      this.xCallMe = callback;
      call();
    }

    public void setInOut( /*INOUT*/XCallMe[] callback ) throws com.sun.star.uno.RuntimeException {
      XCallMe r = xCallMe;
      xCallMe = callback[0];
      callback[0] = r;
      call();
    }
View Full Code Here

TOP

Related Classes of test.XCallMe

Copyright © 2018 www.massapicom. 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.