Package org.drools.guvnor.client.modeldriven.testing

Examples of org.drools.guvnor.client.modeldriven.testing.VerifyField


        total++;
      } else if (f instanceof VerifyFact) {
        VerifyFact vf = (VerifyFact)f;
        for (Iterator it = vf.fieldValues.iterator(); it.hasNext();) {
          total++;
          VerifyField vfl = (VerifyField) it.next();
          HorizontalPanel h = new HorizontalPanel();
          if (!vfl.successResult.booleanValue()) {
            h.add(new Image("images/warning.gif"));
            failures++;
          } else {
View Full Code Here


        pop.addRow(b);
        Button ok = new Button(constants.OK());
        ok.addClickListener(new ClickListener() {
                  public void onClick(Widget w) {
                    String f = b.getItemText(b.getSelectedIndex());
                    vf.fieldValues.add(new VerifyField(f, "", "=="));
                        FlexTable data = render(vf);
                        outer.setWidget(1, 0, data);
                        pop.hide();
                  }
                });
View Full Code Here

    }

  private FlexTable render(final VerifyFact vf) {
    FlexTable data = new FlexTable();
        for (int i = 0; i < vf.fieldValues.size(); i++) {
            final VerifyField fld = (VerifyField) vf.fieldValues.get(i);
            data.setWidget(i, 1, new SmallLabel(fld.fieldName + ":"));
            data.getFlexCellFormatter().setHorizontalAlignment(i, 1, HasHorizontalAlignment.ALIGN_RIGHT);

            final ListBox opr = new ListBox();
            opr.addItem(constants.equalsScenario(), "==");
View Full Code Here

          checkFact(value, fact);
          if (value.wasSuccessful()) return;
        }
      }
      for (Iterator iterator = value.fieldValues.iterator(); iterator.hasNext();) {
        VerifyField vfl = (VerifyField) iterator.next();
        if (vfl.successResult == null) {
          vfl.successResult = Boolean.FALSE;
          vfl.actualResult = "No match";
        }
      }
View Full Code Here

     }
  }

  private void checkFact(VerifyFact value, Object fact) {
    for (int i = 0; i < value.fieldValues.size(); i++) {
      VerifyField fld = (VerifyField) value.fieldValues.get(i);
      Map<String, Object> st = new HashMap<String, Object>();
      st.put("__fact__", fact);
      if (fld.expected != null) {
        Object expectedVal = fld.expected.trim();
        if (fld.expected.startsWith("=")) {
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.modeldriven.testing.VerifyField

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.