2323
2424import java .util .List ;
2525
26- import org .junit .Ignore ;
2726import org .junit .Test ;
2827import org .sonar .api .server .rule .RulesDefinition ;
2928
@@ -38,14 +37,15 @@ public class CheckstyleRulesDefinitionTest {
3837 "com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck" ,
3938 "com.puppycrawl.tools.checkstyle.checks.regexp.RegexpMultilineCheck" ,
4039 "com.puppycrawl.tools.checkstyle.checks.regexp.RegexpOnFilenameCheck" ,
41- "com.puppycrawl.tools.checkstyle.checks.RegexpCheck" ,
40+ "com.puppycrawl.tools.checkstyle.checks.regexp. RegexpCheck" ,
4241 "com.puppycrawl.tools.checkstyle.checks.header.RegexpHeaderCheck" ,
4342 "com.puppycrawl.tools.checkstyle.checks.imports.ImportControlCheck" ,
44- "com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationLocationCheck"
43+ "com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationLocationCheck" ,
44+ "com.puppycrawl.tools.checkstyle.checks.SuppressWarningsHolder" ,
45+ "com.puppycrawl.tools.checkstyle.checks.FileContentsHolder"
4546 );
4647
4748 @ Test
48- @ Ignore
4949 public void test () {
5050 final CheckstyleRulesDefinition definition = new CheckstyleRulesDefinition ();
5151 final RulesDefinition .Context context = new RulesDefinition .Context ();
@@ -57,7 +57,7 @@ public void test() {
5757 assertThat (repository .language ()).isEqualTo ("java" );
5858
5959 final List <RulesDefinition .Rule > rules = repository .rules ();
60- assertThat (rules ).hasSize (150 );
60+ assertThat (rules ).hasSize (154 );
6161
6262 for (RulesDefinition .Rule rule : rules ) {
6363 assertThat (rule .key ()).isNotNull ();
@@ -76,15 +76,11 @@ public void test() {
7676 if (NO_SQALE .contains (rule .key ())) {
7777 assertThat (rule .debtRemediationFunction ()).overridingErrorMessage (
7878 "Sqale remediation function is set for rule '" + rule .key ()).isNull ();
79- assertThat (rule .debtSubCharacteristic ()).overridingErrorMessage (
80- "Sqale characteristic is set for rule '" + rule .key ()).isNull ();
8179 }
8280 else {
8381 assertThat (rule .debtRemediationFunction ()).overridingErrorMessage (
8482 "Sqale remediation function is not set for rule '" + rule .key ())
8583 .isNotNull ();
86- assertThat (rule .debtSubCharacteristic ()).overridingErrorMessage (
87- "Sqale characteristic is not set for rule '" + rule .key ()).isNotNull ();
8884 }
8985 }
9086 }
0 commit comments