assertTrue("equals", !fStubContent.equals(null));
}
+ // ------------------------------------------------------------------------
+ // hashCode
+ // ------------------------------------------------------------------------
+
+ public void testHashCode() throws Exception {
+ assertTrue("hashCode", fBasicContent0.hashCode() == fBasicContent2.hashCode());
+ assertTrue("hashCode", fBasicContent0.hashCode() != fStubContent.hashCode());
+ }
+
+ public void testHashCode2() throws Exception {
+ TmfEventContent basicContent0 = new TmfEventContent(null, fRawContent0);
+ TmfEventContent basicContent1 = new TmfEventContent(fEvent, null);
+ TmfEventContent basicContent2 = new TmfEventContent(null, null);
+
+ assertTrue("hashCode", fBasicContent0.hashCode() != basicContent0.hashCode());
+ assertTrue("hashCode", fBasicContent0.hashCode() != basicContent1.hashCode());
+ assertTrue("hashCode", fBasicContent0.hashCode() != basicContent2.hashCode());
+
+ assertTrue("hashCode", basicContent0.hashCode() != basicContent1.hashCode());
+ assertTrue("hashCode", basicContent0.hashCode() != basicContent2.hashCode());
+
+ assertTrue("hashCode", basicContent1.hashCode() != basicContent2.hashCode());
+ }
+
// ------------------------------------------------------------------------
// toString
// ------------------------------------------------------------------------