RegexComplexityCheck extends AbstractRegexCheck { public void setMax(int max) { this.max = max; }  @Override List<Tree.Kind> nodesToVisit(); @Override void checkRegex(RegexParseResult parseResult, MethodInvocationTree mit); @Override void visitTrivia(SyntaxTrivia syntaxTrivia); @Override void leaveFile(JavaFileScannerContext context); void setMax(int max);  }
@Test void testWithThreshold0() { RegexComplexityCheck check = new RegexComplexityCheck(); check.setMax(0); JavaCheckVerifier.newVerifier() .onFile(testSourcesPath("checks/regex/RegexComplexityCheckWithThreshold0.java")) .withCheck(check) .verifyIssues(); }
@Test void testWithThreshold1() { RegexComplexityCheck check = new RegexComplexityCheck(); check.setMax(1); JavaCheckVerifier.newVerifier() .onFile(testSourcesPath("checks/regex/RegexComplexityCheckWithThreshold1.java")) .withCheck(check) .verifyIssues(); }