Exemplo n.º 1
0
  /**
   * Creating a TestEnvironment for the interfaces to be tested. Creates an instance of the service
   * <code>com.sun.star.frame.ContentHandlerFactory</code>.
   *
   * <p>
   */
  @Override
  protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log)
      throws Exception {
    XInterface oObj = null;
    Object oInterface = null;

    // now get the OButtonControl
    oInterface = Param.getMSF().createInstance("com.sun.star.frame.ContentHandlerFactory");

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

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

    XNameAccess xNA = UnoRuntime.queryInterface(XNameAccess.class, oObj);
    tEnv.addObjRelation("XMSF.serviceNames", xNA.getElementNames());
    xNA.getElementNames();

    // com.sun.star.container.XContainerQuery
    NamedValue[] querySequenze = new NamedValue[1];
    NamedValue query = new NamedValue();
    query.Name = "Name";
    query.Value = "com.sun.star.comp.framework.SoundHandler";
    querySequenze[0] = query;

    tEnv.addObjRelation("XContainerQuery.createSubSetEnumerationByProperties", querySequenze);

    return tEnv;
  } // finish method getTestEnvironment
Exemplo n.º 2
0
  /**
   * Set some member variable of the super class <CODE>GenericModelTest</CODE>:
   *
   * <pre>
   *    super.m_ChangePropertyName = "Text";
   *    super.m_kindOfControl="ComboBox";
   *    super.m_ObjectName = "stardiv.one.form.component.ComboBox";
   *
   *    NamedValue DataField = new NamedValue();
   *    DataField.Name = "DataField";
   *    DataField.Value = DBTools.TST_STRING_F;
   *    super.m_propertiesToSet.add(DataField);
   *    super.m_LCShape_Type = "FixedText";
   * </pre>
   *
   * Then <CODE>super.initialize()</CODE> was called.
   *
   * @param tParam the test parameter
   * @param log the log writer
   */
  protected void initialize(TestParameters tParam, PrintWriter log) {

    super.initialize(tParam, log);

    super.m_ChangePropertyName = "Text";

    super.m_kindOfControl = "ComboBox";

    super.m_ObjectName = "stardiv.one.form.component.ComboBox";

    NamedValue DataField = new NamedValue();
    DataField.Name = "DataField";
    DataField.Value = DBTools.TST_STRING_F;
    super.m_propertiesToSet.add(DataField);

    super.m_LCShape_Type = "FixedText";
  }
Exemplo n.º 3
0
  /**
   * Set some member variable of the super class <CODE>GenericModelTest</CODE>:
   *
   * <pre>
   *    super.m_ChangePropertyName</CODE> = "State";
   *    super.m_kindOfControl</CODE>="RadioButton";
   *    super.m_ObjectName</CODE> = "RadioButton";
   *    NamedValue myProp = new NamedValue();
   *        myProp.Name = "DataField";
   *        myProp.Value = DBTools.TST_STRING_F;
   *        super.m_propertiesToSet.add(myProp);
   *    super.m_LCShape_Type = "GroupBox";
   * </pre>
   *
   * Then <CODE>super.initialize()</CODE> was called.
   *
   * @param tParam the test parameter
   * @param log the log writer
   */
  @Override
  protected void initialize(TestParameters tParam, PrintWriter log) throws Exception {

    super.initialize(tParam, log);
    super.m_ChangePropertyName = "State";

    super.m_kindOfControl = "RadioButton";

    super.m_ObjectName = "stardiv.one.form.component.RadioButton";

    NamedValue myProp = new NamedValue();
    myProp.Name = "DataField";
    myProp.Value = DBTools.TST_STRING_F;
    super.m_propertiesToSet.add(myProp);

    super.m_LCShape_Type = "GroupBox";
  }