Package org.camunda.bpm.engine.impl.form.validator

Examples of org.camunda.bpm.engine.impl.form.validator.MaxLengthValidator.validate()


  }

  public void testMaxLengthValidator() {
    MaxLengthValidator validator = new MaxLengthValidator();

    assertTrue(validator.validate(null, null));

    assertTrue(validator.validate("test", new TestValidatorContext("5")));
    assertFalse(validator.validate("test", new TestValidatorContext("4")));

    try {
View Full Code Here


  public void testMaxLengthValidator() {
    MaxLengthValidator validator = new MaxLengthValidator();

    assertTrue(validator.validate(null, null));

    assertTrue(validator.validate("test", new TestValidatorContext("5")));
    assertFalse(validator.validate("test", new TestValidatorContext("4")));

    try {
      validator.validate("test", new TestValidatorContext("4.4"));
      fail("exception expected");
View Full Code Here

    MaxLengthValidator validator = new MaxLengthValidator();

    assertTrue(validator.validate(null, null));

    assertTrue(validator.validate("test", new TestValidatorContext("5")));
    assertFalse(validator.validate("test", new TestValidatorContext("4")));

    try {
      validator.validate("test", new TestValidatorContext("4.4"));
      fail("exception expected");
    } catch (ProcessEngineException e) {
View Full Code Here

    assertTrue(validator.validate("test", new TestValidatorContext("5")));
    assertFalse(validator.validate("test", new TestValidatorContext("4")));

    try {
      validator.validate("test", new TestValidatorContext("4.4"));
      fail("exception expected");
    } catch (ProcessEngineException e) {
      assertTrue(e.getMessage().contains("Cannot validate \"maxlength\": configuration 4.4 cannot be interpreted as Integer"));
    }
  }
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.