Examples of convertAndValidate()


Examples of org.araneaframework.uilib.form.FormWidget.convertAndValidate()

    ConstraintGroupHelper groupHelper = new ConstraintGroupHelper();   
    testForm.getElement("myDateTime").setConstraint(groupHelper.createGroupedConstraint(new NotEmptyConstraint(), "active"));
   
    MockUiLibUtil.emulateHandleRequest(testForm, "testForm", request);

    assertFalse("Test form must be invalid after reading from request", testForm.convertAndValidate());      
  }

  /**
   * Test reading from request with a grouped constraint set, date is invalid.
   */
 
View Full Code Here

Examples of org.araneaframework.uilib.form.FormWidget.convertAndValidate()

    // create helper
    ConstraintGroupHelper groupHelper = new ConstraintGroupHelper();   
    testForm.getElement("myDateTime").setConstraint(groupHelper.createGroupedConstraint(new NotEmptyConstraint(), "active"));
   
    MockUiLibUtil.emulateHandleRequest(testForm, "testForm", request);
    assertFalse("Test form must be invalid after reading from request", testForm.convertAndValidate());      
  }
}
View Full Code Here

Examples of org.araneaframework.uilib.form.FormWidget.convertAndValidate()

    //Testing that invalid requests are read right
    StandardServletInputData input = new StandardServletInputData(invalidRequest);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
   
    assertTrue("Test form must not be valid after reading from request", !testForm.convertAndValidate());
  }

  /**
   * Testing reading from request with a mandatory element missing.
   */
 
View Full Code Here

Examples of org.araneaframework.uilib.form.FormWidget.convertAndValidate()

    //Testing that mandatory items are processed right
    StandardServletInputData input = new StandardServletInputData(mandatoryMissingRequest);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
   
    assertTrue("Test form must not be valid after reading from request", !testForm.convertAndValidate());
  }

  /**
   * Testing reading from request with a not mandatory element missing.
   */
 
View Full Code Here

Examples of org.araneaframework.uilib.form.FormWidget.convertAndValidate()

    StandardServletInputData input = new StandardServletInputData(notMandatoryMissingRequest);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
   
    assertTrue("Test form must be valid after reading from request", testForm.convertAndValidate());
  }
 
/**
   * Testing reading from request with a grouped constraint set.
   */
 
View Full Code Here

Examples of org.araneaframework.uilib.form.FormWidget.convertAndValidate()

    input.pushScope("testForm");
    testForm._getWidget().update(input);

    groupHelper.setActiveGroup("active");

    assertTrue("Test form must not be valid after reading from request", !testForm.convertAndValidate());       
  }
 
  /**
   * Testing reading from request with a grouped constraint set.
   */
 
View Full Code Here

Examples of org.araneaframework.uilib.form.FormWidget.convertAndValidate()

    StandardServletInputData input = new StandardServletInputData(notMandatoryMissingRequest);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
   
    groupHelper.setActiveGroup("active");
    assertTrue("Test form must be valid after reading from request", testForm.convertAndValidate());      
  }
 
  /**
   * Testing reading from request with a grouped constraint set.
   */
 
View Full Code Here

Examples of org.araneaframework.uilib.form.FormWidget.convertAndValidate()

   
    StandardServletInputData input = new StandardServletInputData(notMandatoryMissingRequest);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
   
    assertTrue("Test form must be valid after reading from request", testForm.convertAndValidate());      
  }
 
  /**
   * Testing events.
   */
 
View Full Code Here

Examples of org.araneaframework.uilib.form.FormWidget.convertAndValidate()

    testForm.getElement("myDateTime").setConstraint(new NotEmptyConstraint());
   
    StandardServletInputData input = new StandardServletInputData(request);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
    assertTrue("Test form must not be valid after reading from request", !testForm.convertAndValidate());
  }

  /**
   * Testing reading from request with a grouped constraint set.
   */
 
View Full Code Here

Examples of org.araneaframework.uilib.form.FormWidget.convertAndValidate()

    StandardServletInputData input = new StandardServletInputData(request);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
   
    groupHelper.setActiveGroup("active");
    assertTrue("Test form must not be valid after reading from request", !testForm.convertAndValidate());
  }
 
  /**
   * Testing reading from request with a grouped constraint set.
   */
 
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.