【发布时间】:2019-06-18 08:20:21
【问题描述】:
这是我的代码 sn-p:
@Test
fun `request should return anon id if query param present`(@MockK(relaxed = true) req: ServerRequest)
我正在使用 JUnit5(木星)。 我的例外是:
io.mockk.MockKException: no answer found for: ServerRequest(#1).cookies()
这很奇怪,因为如果我正确理解 relaxed,我的 ServerRequest 实例应该总是有一些 value。
为什么在我的情况下没有?
【问题讨论】:
标签: kotlin junit5 mockk junit-jupiter