Package com.bleujin.framework.valid.validator

Examples of com.bleujin.framework.valid.validator.MaxLength


   
  }
 
 
  public void testMaxLength() throws Exception {
    assertEquals(true, new MaxLength(b, SVALUE, 2).isValid()) ;

    b.setSvalue("abc") ;
    assertEquals(true, new MaxLength(b, SVALUE, 3).isValid()) ;
    assertEquals(false, new MaxLength(b, SVALUE, 2).isValid()) ;

    b.setSvalue("�ѱ�") ;
    assertEquals(true, new MaxLength(b, SVALUE, 2).isValid()) ;
    assertEquals(true, new MaxLength(b, SVALUE, 3).isValid()) ;
    assertEquals(false, new MaxLength(b, SVALUE, 1).isValid()) ;

  }
View Full Code Here


  }

 
  public void testMaxUTF8ByteLength() throws Exception {
    assertEquals(true, new MaxLength(b, SVALUE, 1).isValid()) ;

    b.setSvalue("abc") ;
    assertEquals(true, new MaxLength(b, SVALUE, 3).isValid()) ;
    assertEquals(false, new MaxLength(b, SVALUE, 2).isValid()) ;

    b.setSvalue("�ѱ�") ;
    assertEquals(true, new MaxUTFByteLength(b, SVALUE, 6).isValid()) ;
    assertEquals(false, new MaxUTFByteLength(b, SVALUE, 5).isValid()) ;
View Full Code Here

TOP

Related Classes of com.bleujin.framework.valid.validator.MaxLength

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.