yamlln

导航

2022年8月2日 #

单元测试 PowerMockito 模拟方法返回为空

摘要: PowerMockito.doReturn(testData).when(testService).getData(params, "ee", "Y"); 使用以上代码调用模拟某一方法,debug此调用方法处,testData为空,排查问题发现,此处的params是方法中构造的,和自己模拟的入参不同 阅读全文

posted @ 2022-08-02 16:44 yamlln 阅读(1198) 评论(0) 推荐(0)