Examples of BetweenUTFByteLength


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

    assertEquals(true, new MinUTFByteLength(b, SVALUE, 6).isValid()) ;
    assertEquals(false, new MinUTFByteLength(b, SVALUE, 7).isValid()) ;
  }

  public void testBetweenUTF8ByteLength() throws Exception {
    assertEquals(true, new BetweenUTFByteLength(b, SVALUE, 0, 3).isValid()) ;

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

    b.setSvalue("�ѱ�") ;
    assertEquals(true, new BetweenUTFByteLength(b, SVALUE, 1, 6).isValid()) ;
    assertEquals(true, new BetweenUTFByteLength(b, SVALUE, 6, 10).isValid()) ;
    assertEquals(false, new BetweenUTFByteLength(b, SVALUE, 0, 5).isValid()) ;

  }
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.