Package org.hibernate.validator.constraints

Examples of org.hibernate.validator.constraints.Mod11Check


  }

  @Test
  public void testFailOnNonNumeric() throws Exception {
    Mod11CheckValidator validator = new Mod11CheckValidator();
    Mod11Check modCheck = createMod11CheckAnnotation(
        0,
        Integer.MAX_VALUE,
        -1,
        false,
        '0',
View Full Code Here


  }

  @Test
  public void testIgnoreNonNumeric() throws Exception {
    Mod11CheckValidator validator = new Mod11CheckValidator();
    Mod11Check modCheck = createMod11CheckAnnotation(
        0,
        Integer.MAX_VALUE,
        -1,
        true,
        '0',
View Full Code Here

  }

  @Test
  public void testIgnoreNonNumericWithCharCheckDigit() throws Exception {
    Mod11CheckValidator validator = new Mod11CheckValidator();
    Mod11Check modCheck = createMod11CheckAnnotation(
        0,
        12,
        -1,
        true,
        '0',
View Full Code Here

  }

  @Test
  public void testValidMod11() throws Exception {
    Mod11CheckValidator validator = new Mod11CheckValidator();
    Mod11Check modCheck = createMod11CheckAnnotation(
        0,
        Integer.MAX_VALUE,
        -1,
        true,
        '0',
View Full Code Here

  }

  @Test
  public void testInvalidMod11() throws Exception {
    Mod11CheckValidator validator = new Mod11CheckValidator();
    Mod11Check modCheck = createMod11CheckAnnotation(
        0,
        Integer.MAX_VALUE,
        -1,
        true,
        '0',
View Full Code Here

  }

  @Test
  public void testValidMod11CharCheckDigit() throws Exception {
    Mod11CheckValidator validator = new Mod11CheckValidator();
    Mod11Check modCheck = createMod11CheckAnnotation(
        0,
        Integer.MAX_VALUE,
        -1,
        false,
        'X',
View Full Code Here

  }

  @Test
  public void testInvalidMod11CharCheckDigit() throws Exception {
    Mod11CheckValidator validator = new Mod11CheckValidator();
    Mod11Check modCheck = createMod11CheckAnnotation(
        0,
        Integer.MAX_VALUE,
        -1,
        false,
        'X',
View Full Code Here

  }

  @Test
  public void testValidMod11ReverseOrder() throws Exception {
    Mod11CheckValidator validator = new Mod11CheckValidator();
    Mod11Check modCheck = createMod11CheckAnnotation(
        0,
        Integer.MAX_VALUE,
        -1,
        false,
        'X',
View Full Code Here

  }

  @Test
  public void testInvalidMod11ReverseOrder() throws Exception {
    Mod11CheckValidator validator = new Mod11CheckValidator();
    Mod11Check modCheck = createMod11CheckAnnotation(
        0,
        Integer.MAX_VALUE,
        -1,
        false,
        'X',
View Full Code Here

public class Mod11CheckValidatorTest {

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testInvalidStartIndex() {
    Mod11CheckValidator validator = new Mod11CheckValidator();
    Mod11Check modCheck = createMod11CheckAnnotation(
        -1,
        Integer.MAX_VALUE,
        -1,
        false,
        '0',
View Full Code Here

TOP

Related Classes of org.hibernate.validator.constraints.Mod11Check

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.