KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > checks > coding > EqualsHashCodeCheckTest


1 package com.puppycrawl.tools.checkstyle.checks.coding;
2
3 import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
4 import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
5
6 public class EqualsHashCodeCheckTest
7     extends BaseCheckTestCase
8 {
9     public void testIt() throws Exception JavaDoc
10     {
11         final DefaultConfiguration checkConfig =
12             createCheckConfig(EqualsHashCodeCheck.class);
13         final String JavaDoc[] expected = {
14             "126:9: Definition of 'equals()' without corresponding definition of 'hashCode()'.",
15             "163:13: Definition of 'equals()' without corresponding definition of 'hashCode()'.",
16             "191:9: Definition of 'equals()' without corresponding definition of 'hashCode()'.",
17         };
18         verify(checkConfig, getPath("InputSemantic.java"), expected);
19     }
20 }
21
Popular Tags