Package org.hdiv.regex

Examples of org.hdiv.regex.DefaultPatternMatcher


  public void validations() {
    assertNotNull(validations);

    assertEquals(2, validations.getUrls().size());

    List<IValidation> urlValidations = validations.getUrls().get(new DefaultPatternMatcher("/secure/.*"));
    assertEquals(1, urlValidations.size()); // Only safetext

    urlValidations = validations.getUrls().get(new DefaultPatternMatcher("/safetext/.*"));
    assertEquals(6, urlValidations.size());// Defaults
  }
View Full Code Here


    Map<PatternMatcher, List<IValidation>> urls = validations.getUrls();
    assertEquals(2, urls.size());

    // First url
    List<IValidation> vals = urls.get(new DefaultPatternMatcher("a"));

    assertEquals(1, vals.size());
    // 1 custom rules
    Validation val = (Validation) vals.get(0);
    assertEquals("id1", val.getName());
    assertFalse(val.isDefaultValidation());

    // Second url
    vals = urls.get(new DefaultPatternMatcher("b"));
    assertEquals(8, vals.size());
    // 2 custom rule + 6 default rules

    val = (Validation) vals.get(0);
    assertEquals("id2", val.getName());
View Full Code Here

TOP

Related Classes of org.hdiv.regex.DefaultPatternMatcher

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.