Package org.hibernate.validator.internal.constraintvalidators.hv

Examples of org.hibernate.validator.internal.constraintvalidators.hv.Mod11CheckValidator.initialize()


        false,
        '0',
        '0',
        ProcessingDirection.RIGHT_TO_LEFT
    );
    validator.initialize( modCheck );
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testInvalidEndIndex() {
    Mod11CheckValidator validator = new Mod11CheckValidator();
View Full Code Here


        false,
        '0',
        '0',
        ProcessingDirection.RIGHT_TO_LEFT
    );
    validator.initialize( modCheck );
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testEndIndexLessThanStartIndex() {
    Mod11CheckValidator validator = new Mod11CheckValidator();
View Full Code Here

        false,
        '0',
        '0',
        ProcessingDirection.RIGHT_TO_LEFT
    );
    validator.initialize( modCheck );
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testInvalidcheckDigitIndex() {
    Mod11CheckValidator validator = new Mod11CheckValidator();
View Full Code Here

        false,
        '0',
        '0',
        ProcessingDirection.RIGHT_TO_LEFT
    );
    validator.initialize( modCheck );
  }

  @Test
  public void testFailOnNonNumeric() throws Exception {
    Mod11CheckValidator validator = new Mod11CheckValidator();
View Full Code Here

        false,
        '0',
        '0',
        ProcessingDirection.RIGHT_TO_LEFT
    );
    validator.initialize( modCheck );

    assertFalse( validator.isValid( new MyCustomStringImpl( "Z54679542616" ), null ) );
  }

  @Test
View Full Code Here

        true,
        '0',
        '0',
        ProcessingDirection.RIGHT_TO_LEFT
    );
    validator.initialize( modCheck );

    assertTrue( validator.isValid( new MyCustomStringImpl( "Z54679542616" ), null ) );
  }

  @Test
View Full Code Here

        true,
        '0',
        'X',
        ProcessingDirection.LEFT_TO_RIGHT
    );
    validator.initialize( modCheck );

    assertTrue( validator.isValid( "123-456-789-X", null ) );
  }

  @Test
View Full Code Here

        true,
        '0',
        '0',
        ProcessingDirection.RIGHT_TO_LEFT
    );
    validator.initialize( modCheck );

    assertTrue( validator.isValid( "23322023583", null ) );
    assertTrue( validator.isValid( "378.796.950-01", null ) );
    assertTrue( validator.isValid( "331.814.296-43", null ) );
  }
View Full Code Here

        true,
        '0',
        '0',
        ProcessingDirection.RIGHT_TO_LEFT
    );
    validator.initialize( modCheck );

    assertFalse( validator.isValid( "23322023584", null ) );
    assertFalse( validator.isValid( "378.796.950-02", null ) );
    assertFalse( validator.isValid( "331.814.296-52", null ) );
  }
View Full Code Here

        false,
        'X',
        'Z',
        ProcessingDirection.RIGHT_TO_LEFT
    );
    validator.initialize( modCheck );

    assertTrue( validator.isValid( "123456Z", null ) );
    assertTrue( validator.isValid( "1234575X", null ) );
  }
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.