* <p>
* JUnit test suite for the TmfEventType class.
*/
+@SuppressWarnings("nls")
public class TmfEventTypeTest extends TestCase {
// ------------------------------------------------------------------------
assertTrue("equals", fType0.equals(fType2));
}
- public void testEqualsConsistency() throws Exception {
- assertTrue("equals", fType0.equals(fType0));
- assertTrue("equals", fType0.equals(fType0));
-
- assertTrue("equals", fType3.equals(fType3));
- assertTrue("equals", fType3.equals(fType3));
- }
-
public void testEqualsNull() throws Exception {
assertTrue("equals", !fType0.equals(null));
assertTrue("equals", !fType3.equals(null));
}
+ // ------------------------------------------------------------------------
+ // hashCode
+ // ------------------------------------------------------------------------
+
+ public void testHashCode() throws Exception {
+ assertTrue("hashCode", fType0.hashCode() == fType1.hashCode());
+ assertTrue("hashCode", fType0.hashCode() != fType3.hashCode());
+ }
+
// ------------------------------------------------------------------------
// toString
// ------------------------------------------------------------------------