Package com.opensymphony.xwork.validator

Examples of com.opensymphony.xwork.validator.DefaultActionValidatorManager


    assertEquals(3,errors.size());
  }
 
  @SuppressWarnings("unchecked")
  public void testActionValidationMissingTokenNUsername() throws Exception{
    DefaultActionValidatorManager validator = new DefaultActionValidatorManager();
    action.setToken("foobartoken");
    action.setUsername("hchen1");
    validator.validate(action, "resetPassword");
    assertTrue(action.hasFieldErrors());
    Map<String,Object> errors = action.getFieldErrors();
    assertEquals(2,errors.size());
  }
View Full Code Here


    assertEquals(2,errors.size());
  }
 
  @SuppressWarnings("unchecked")
  public void testActionValidationPasswdInputNotSame() throws Exception{
    DefaultActionValidatorManager validator = new DefaultActionValidatorManager();
    action.setToken("foobartoken");
    action.setUsername("hchen1");
    action.setPassword("abcdeffg");
    action.setPasswordConfirm("1234567");
    validator.validate(action, "resetPassword");
    assertTrue(action.hasFieldErrors());
    Map<String,Object> errors = action.getFieldErrors();
    assertEquals(1,errors.size());
  }
View Full Code Here

    assertEquals(1,errors.size());
  }
 
  @SuppressWarnings("unchecked")
  public void testActionValidationPasswdTooShort() throws Exception{
    DefaultActionValidatorManager validator = new DefaultActionValidatorManager();
    action.setToken("foobartoken");
    action.setUsername("hchen1");
    action.setPassword("1");
    action.setPasswordConfirm("1");
    validator.validate(action, "resetPassword");
    assertTrue(action.hasFieldErrors());
    Map<String,Object> errors = action.getFieldErrors();
    assertEquals(1,errors.size());
  }
View Full Code Here

TOP

Related Classes of com.opensymphony.xwork.validator.DefaultActionValidatorManager

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.