【发布时间】:2018-10-06 08:22:27
【问题描述】:
当我导入 org.hamcrest.Matchers 时,我无法运行单元测试,因为我需要 lessThan()。我的仪器测试在使用 greaterThan 匹配器而不是单元测试时正确编译
代码:
import org.hamcrest.CoreMatchers.*
import org.hamcrest.Matchers.lessThan
import org.junit.Assert.assertThat
import org.junit.Test
import java.util.*
Gradle 日志:https://pastebin.com/ibgzzrg1
删除第 2 行会使项目编译并运行测试。
【问题讨论】:
标签: android junit kotlin hamcrest