KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > checks > modifier > ModifierOrderCheckTest


1 package com.puppycrawl.tools.checkstyle.checks.modifier;
2
3 import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
4 import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
5
6 public class ModifierOrderCheckTest
7     extends BaseCheckTestCase
8 {
9     public void testIt() throws Exception JavaDoc
10     {
11         final DefaultConfiguration checkConfig =
12             createCheckConfig(ModifierOrderCheck.class);
13         final String JavaDoc[] expected = {
14             "14:10: 'final' modifier out of order with the JLS suggestions.",
15             "18:12: 'private' modifier out of order with the JLS suggestions.",
16             "24:14: 'private' modifier out of order with the JLS suggestions.",
17             "34:13: '@MyAnnotation2' annotation modifier does not preceed non-annotation modifiers.",
18             "39:13: '@MyAnnotation2' annotation modifier does not preceed non-annotation modifiers.",
19             "49:35: '@MyAnnotation4' annotation modifier does not preceed non-annotation modifiers.",
20         };
21         verify(checkConfig, getPath("InputModifier.java"), expected);
22     }
23 }
24
Popular Tags