How to use JUnit and Hamcrest together?

前端 未结 8 961
傲寒
傲寒 2020-12-07 13:03

I can\'t understand how JUnit 4.8 should work with Hamcrest matchers. There are some matchers defined inside junit-4.8.jar in org.hamcrest.CoreMatchers. At the

8条回答
  •  [愿得一人]
    2020-12-07 13:50

    Both JUnit-4.12 and JUnit-Dep-4.10 has Hamcrest dependencies according to the respective .xml files.

    Further investigation shows that although the dependency was made in the .xml files, the source and classes in the jars. The seems to be a way of excluding the dependency in build.gradle ... testing it out to keep everything clean.

    Just an f.y.i.

提交回复
热议问题