我有以下情景
class A {
Response response = someFunction()
response.doStuff()
}
class Response {
fun doStuff() {
//check if response status is OK
//some stuff, not to be executed when in test
}
}
我需要检查响应是否正常但不执行其余逻辑。 我希望实现像 -
这样的东西when(response.doStuff())Then(assert response is ok)
你能告诉我怎么做吗?