Пример #1
0
  public void setUp() throws Exception {
    super.setUp();

    input =
        new UIRangedNumberInput() {
          private String minValue;
          private String maxValue;
          private boolean disabled;

          public String getMinValue() {
            return minValue;
          }

          public void setMinValue(String minValue) {
            this.minValue = minValue;
          }

          public String getMaxValue() {
            return maxValue;
          }

          public void setMaxValue(String maxValue) {
            this.maxValue = maxValue;
          }

          public boolean isDisabled() {
            return disabled;
          }

          public void setDisabled(boolean disabled) {
            this.disabled = disabled;
          }
        };

    input.setMaxValue("100");
    input.setMinValue("0");
    input.setValid(true);
  }
Пример #2
0
 public void testValidateMaxNullMaxValue() throws Exception {
   input.setMaxValue(null);
   checkValid();
   input.validateValue(facesContext, new Double(223.45));
   checkInvalid();
 }