修复单元测试报错

pull/2/head
YunaiV 2023-04-14 22:59:45 +08:00
parent b27964b483
commit d2ba90db5d
3 changed files with 2 additions and 5 deletions

View File

@ -20,10 +20,6 @@
</description>
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
<properties>
<ip2region.version>2.6.6</ip2region.version>
</properties>
<dependencies>
<dependency>
<groupId>cn.iocoder.boot</groupId>

View File

@ -256,6 +256,7 @@ public class SmsSendServiceImplTest extends BaseMockitoUnitTest {
when(smsClientFactory.getSmsClient(eq(message.getChannelId()))).thenReturn(smsClient);
// mock SmsClient 的方法
SmsCommonResult<SmsSendRespDTO> sendResult = randomPojo(SmsCommonResult.class, SmsSendRespDTO.class);
sendResult.setData(randomPojo(SmsSendRespDTO.class));
when(smsClient.sendSms(eq(message.getLogId()), eq(message.getMobile()), eq(message.getApiTemplateId()),
eq(message.getTemplateParams()))).thenReturn(sendResult);