aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierCheckTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierCheckTest.java')
-rw-r--r--src/test/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierCheckTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierCheckTest.java
index 4d90731cd..53405d583 100644
--- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierCheckTest.java
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierCheckTest.java
@@ -232,6 +232,16 @@ public class RedundantModifierCheckTest
}
@Test
+ public void testEnumStaticMethodsInPublicClass() throws Exception {
+ final DefaultConfiguration checkConfig = createModuleConfig(RedundantModifierCheck.class);
+ final String[] expected = {
+ "12:23: " + getCheckMessage(MSG_KEY, "final"),
+ };
+ verify(checkConfig,
+ getPath("InputRedundantModifierFinalInEnumStaticMethods.java"), expected);
+ }
+
+ @Test
public void testAnnotationOnEnumConstructor() throws Exception {
final DefaultConfiguration checkConfig = createModuleConfig(RedundantModifierCheck.class);
final String[] expected = {