我正在测试使用MockWebServer的挂起函数返回结果的api,但是除非使用launch构建器,否则它不适用于runBlockingTest、testCoroutineDispatcher、testCorounieScopeabstract class AbstractPostApiTest {
println("Abstr
我正在为使用WebClient调用REST端点的方法编写单元测试。使用MockWebServer,我能够涵盖成功响应的代码,但我无法找到任何方法来模拟错误响应,以便与错误处理相关的代码也在单元测试中得到涵盖。});试题班:public class EmployeeServiceTest {
private MockWebServeremployeeService = new EmployeeService(WebClient.c