Hamcrest 存储库包括 org.hamcrest.io.FileMatchers
(参见 https://github.com/hamcrest/JavaHamcrest/tree/master/hamcrest-library/src/main/java/org/hamcrest/io)但它不存在于构建工件 hamcrest-all
或 hamcrest 库
(v1.3)。那个匹配器怎么了?它在任何 JAR 工件中都可用吗?
最佳答案
FileMatchers
是 added in July 2012 ,几天后Hamcrest 1.3 was released .截至 2014 年 9 月,还没有另一个公开的 Hamcrest 版本。 Although there is demand for a 1.4, there's no roadmap for a release .
该类将成为 1.4 版本的一部分,但在此之前,请考虑本地构建 Hamcrest 或将单个类复制到您的项目中 (或切换到 AssertJ )。
关于java - org.hamcrest.io.FileMatchers 是否包含在任何 hamcrest 构建中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25939204/