/**
* Test for the method hashCode()
*
* @see javax.management.MBeanFeatureInfo#hashCode();
*/
public final void testHashCode() {
MBeanFeatureInfo inf1 = new MBeanFeatureInfo("name", "description");
MBeanFeatureInfo inf2 = new MBeanFeatureInfo("name", "description");
assertEquals("The hashCode() method must return the same integer "
+ "when it is invoked on the same object more than once!", inf1
.hashCode(), inf1.hashCode());
assertEquals("If two objects are equal according to the equals(Object)"
+ " method, then hashCode method on each of them must"
+ " produce the same integer. ", inf1.hashCode(), inf2.hashCode());
}
MBeanFeatureInfoTest.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:freeVM
作者:
评论列表
文章目录