NoSuchMethodError with Hamcrest 1.3 & JUnit 4.11

前端 未结 8 1362
独厮守ぢ
独厮守ぢ 2020-12-30 19:03

Another instance of the NoSuchMethodError for the JUnit & Hamcrest combination. Offending code:

assertThat(dirReader.document(0).getFields()         


        
8条回答
  •  [愿得一人]
    2020-12-30 19:26

    If you are using Eclipse: For me, in eclipse-> project properties->Java build Path moving mockito-all-1.9.5.jar to the bottom of the 'Order and Export' list did the trick. Just above that I have junit-4.11.jar and above that hamcrest-core-1.3.jar

提交回复
热议问题