JUnit 4.11 ·¢²¼£¬¸Ã°æ±¾Éý¼¶ Hamcrest µ½ 1.3 °æ±¾£¬¸Ä½øÁË assertThat £¬ÀýÈ磺
assertThat(Long.valueOf(1), instanceOf(Integer.class));
ÔÀ´µÄ±¨´íÐÅÏ¢ÊÇ£º
Expected: an instance of java.lang.Integer
got: <1L>
еı¨´íÐÅÏ¢£º
Expected: an instance of java.lang.Integer
but: <1L> is a java.lang.Long
ÁíÍâµÄ¸Ä½øÄÚÈÝ»¹°üÀ¨²ÎÊý»¯²âÊÔ¡¢²âÊÔÖ´ÐеÄ˳Ðò¡¢Maven¡¢¹æÔòµÈ·½Ã棬ÏêÇéÇë¿´ÕâÀï¡£
Ö÷Ò³£ºhttp://www.junit.org/
ÏÂÔØ£ºhttps://github.com/KentBeck/junit
À´×Ô:¿ªÔ´ÖйúÉçÇø

