Examples of TestEnvironment


Examples of lib.TestEnvironment

        }

          oObj = (XInterface) oInterface;

        log.println( "    creating a new environment for object" );
        TestEnvironment tEnv = new TestEnvironment( oObj );

        tEnv.addObjRelation("XInteractionHandler.Request", new TestRequest()) ;

        return tEnv;
    } // finish method getTestEnvironment
View Full Code Here

Examples of lib.TestEnvironment

        com.sun.star.awt.XWindow xWindow = (com.sun.star.awt.XWindow)UnoRuntime.queryInterface (
        com.sun.star.awt.XWindow .class, xPeer);       
       
        log.println( "    creating a new environment for object" );
        TestEnvironment tEnv = new TestEnvironment( oObj );

        log.println("add ObjectRelations err1 and err2 for 'ErrorMessageDialog'");
        tEnv.addObjRelation("ERR1",err1);
        tEnv.addObjRelation("ERR2",err2);
        tEnv.addObjRelation("ERR_XWindow", xWindow);

        return tEnv;
    } // finish method getTestEnvironment
View Full Code Here

Examples of lib.TestEnvironment

        }

        oObj = (XInterface) oInterface;

        log.println( "    creating a new environment for object" );
        TestEnvironment tEnv = new TestEnvironment( oObj );

        // adding obj relation for XNamingService
        try {
            xMSF = (XMultiServiceFactory)Param.getMSF();
            oInterface = xMSF.createInstance( "com.sun.star.sdb.DataSource" );

            XPropertySet xDSProps = (XPropertySet)
                UnoRuntime.queryInterface(XPropertySet.class, oInterface) ;

            xDSProps.setPropertyValue("URL", "sdbc:dbase:file:///.") ;
           
            XDocumentDataSource xDDS = (XDocumentDataSource)
            UnoRuntime.queryInterface(XDocumentDataSource.class, oInterface);
            XStorable store = (XStorable) UnoRuntime.queryInterface(XStorable.class,
            xDDS.getDatabaseDocument ());
            String aFile = utils.getOfficeTemp ((XMultiServiceFactory) Param.getMSF ())+"DatabaseContext.odb";
            log.println("store to '" + aFile + "'");
            store.storeAsURL(aFile,new PropertyValue[]{});           
           
            tEnv.addObjRelation("XNamingService.RegisterObject", oInterface) ;

            tEnv.addObjRelation("INSTANCE", oInterface);

            tEnv.addObjRelation("XContainer.Container",
                (XNamingService) UnoRuntime.queryInterface(
                                    XNamingService.class, oObj));

        } catch (com.sun.star.uno.Exception e) {
            throw new StatusException("Can't create object relation", e) ;
View Full Code Here

Examples of lib.TestEnvironment

        XWindow docWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class,
                                                                xCtrl);
        log.println("creating a new environment for ODatasourceBrowser object");

        TestEnvironment tEnv = new TestEnvironment(oObj);


        //Adding ObjRelations for XInitialization
        tEnv.addObjRelation("XInitialization.args", params);


        //Adding ObjRelations for XController
        tEnv.addObjRelation("Frame", the_frame1);
        tEnv.addObjRelation("SecondModel", aModel1);
        tEnv.addObjRelation("otherWindow", docWindow);
        tEnv.addObjRelation("SecondController", secondController);
        tEnv.addObjRelation("HasViewData", new Boolean(false));


        // Addig relation for XDispatchProvider
        tEnv.addObjRelation("XDispatchProvider.URL",
                            ".uno:DataSourceBrowser/FormLetter");

        return tEnv;
    } // finish method getTestEnvironment
View Full Code Here

Examples of lib.TestEnvironment

        }

        oObj = (XInterface) oInterface;

        log.println( "    creating a new environment for object" );
        TestEnvironment tEnv = new TestEnvironment( oObj );

        return tEnv;
    } // finish method getTestEnvironment
View Full Code Here

Examples of lib.TestEnvironment

       
        log.println("ImplementationName " + util.utils.getImplName(oObj));
       
        log.println("creating TestEnvironment");
       
        TestEnvironment tEnv = new TestEnvironment(oObj);
       
        shortWait();
       
        final XWindow queryWin = xWindow;
       
        tEnv.addObjRelation("EventProducer",
                new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer()
        {
            public void fireEvent()
            {
                Rectangle rect = queryWin.getPosSize();
View Full Code Here

Examples of lib.TestEnvironment

            e.printStackTrace ();
            throw new StatusException("Could not register ", e) ;
        }
       
        log.println( "    creating a new environment for object" );
        TestEnvironment tEnv = new TestEnvironment( oObj );

        // adding obj relation for interface XCompletedConnection
        Object handler = null ;
        try {
            handler = ((XMultiServiceFactory)Param.getMSF()).createInstance
                ("com.sun.star.sdb.InteractionHandler") ;
        } catch (Exception e) {
            log.println("Relation for XCompletedConnection wasn't created") ;
            e.printStackTrace(log) ;
        }

        // dbase does not need user and password
        tEnv.addObjRelation("UserAndPassword", new String[]{"",""}) ;

        tEnv.addObjRelation("XCompletedConnection.Handler",
            UnoRuntime.queryInterface(XInteractionHandler.class, handler)) ;

        return tEnv;
    } // finish method getTestEnvironment
View Full Code Here

Examples of lib.TestEnvironment

           
            oObj = (XInterface) oInterface;
            log.println("ImplementationName: " + utils.getImplName(oObj));

            log.println( "    creating a new environment for object" );
            TestEnvironment tEnv = new TestEnvironment( oObj );

            // for XSingleSelectQueryAnalyzer
            tEnv.addObjRelation("xComposer", xComposer);
           
            // for XSingleSelectQueryComposer
            tEnv.addObjRelation("xQueryAna", xQueryAna);
           
            tEnv.addObjRelation("xProp", xCol);
            tEnv.addObjRelation("colName", xCols.getElementNames()[0]);
           
          envCreatedOK = true ;
            return tEnv;

        } catch(com.sun.star.uno.Exception e) {
View Full Code Here

Examples of lib.TestEnvironment

       
        log.println("ImplementationName " + util.utils.getImplName(oObj));
       
        log.println("creating TestEnvironment ... done");

        TestEnvironment tEnv = new TestEnvironment(oObj);

        shortWait();

        XAccessibleComponent accComp = (XAccessibleComponent) UnoRuntime.queryInterface(
                                               XAccessibleComponent.class,
                                               oObj);

             
              final Point point = accComp.getLocationOnScreen();
      
        tEnv.addObjRelation("EventProducer",
                            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
            public void fireEvent() {
                try {                            
                    Robot rob = new Robot();
                    rob.mouseMove(point.X + 2, point.Y + 7);
View Full Code Here

Examples of lib.TestEnvironment

            throw new StatusException("Couldn't get Control", e);
        }

        log.println("creating a new environment for object");

        TestEnvironment tEnv = new TestEnvironment(oObj);


        //Relations for XSelectionSupplier
        tEnv.addObjRelation("Selections",
                            new Object[] {
            new Object[] { new Integer(0) }, new Object[] { new Integer(1) }
        });
        tEnv.addObjRelation("Comparer",
                            new Comparator() {
            public int compare(Object o1, Object o2) {
                return ((Integer) o1).compareTo((Integer)o2);
            }

            public boolean equals(Object obj) {
                return compare(this, obj) == 0;
            }
        });


        //Realtion for XContainer
        tEnv.addObjRelation("XContainer.Container", aContainer);
        tEnv.addObjRelation("INSTANCE", aControl3);
        tEnv.addObjRelation("INSTANCE2", aControl4);


        //Adding ObjRelation for XView
        tEnv.addObjRelation("GRAPHICS", aGraphic);


        //Adding ObjRelation for XControl
        tEnv.addObjRelation("CONTEXT", xTextDoc);
        tEnv.addObjRelation("WINPEER", the_win);
        tEnv.addObjRelation("TOOLKIT", the_kit);
        tEnv.addObjRelation("MODEL", the_Model);


        // Adding relation for XWindow
        tEnv.addObjRelation("XWindow.AnotherWindow", win);

        // Adding relation for XDispatch
        URL url = new URL();
        url.Complete = ".uno:FormSlots/moveToNext";


        //url.Complete = ".uno:GridSlots/RowHeight";
        //url.Complete = ".uno:GridSlots/RowHeight" ;
        tEnv.addObjRelation("XDispatch.URL", url);

        log.println("ImplName: " + utils.getImplName(oObj));

        FormTools.switchDesignOf((XMultiServiceFactory)Param.getMSF(), xTextDoc);

        // adding relation for XUpdateBroadcaster
        final XInterface ctrl = oObj;
        final XLoadable formLoaderF = formLoader;
        final XPropertySet ps = (XPropertySet) UnoRuntime.queryInterface(
                                        XPropertySet.class, aControl2);
        tEnv.addObjRelation("XUpdateBroadcaster.Checker",
                            new ifc.form._XUpdateBroadcaster.UpdateChecker() {
            private String lastText = "";

            public void update() throws com.sun.star.uno.Exception {
                if (!formLoaderF.isLoaded()) {
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.