【发布时间】:2019-11-14 01:13:09
【问题描述】:
似乎我无法从 Kotlintest v3.4.2 访问 shouldMatchJson 匹配器,方法记录在 https://github.com/kotlintest/kotlintest/blob/master/doc/matchers.md 中。
我得到未解决的参考,我似乎无法导入它。代码说它是 String 类的扩展方法,但尝试使用字符串甚至 """{}""" 但无法访问该方法。难道我做错了什么?其他所有匹配器都正常。
class Test : StringSpec ({
"Test a json" {
"{}".shouldMatchJson("{}")
}
})
【问题讨论】:
标签: testing kotlin kotlintest