diff --git a/yudao-framework/yudao-spring-boot-starter-biz-sms/src/test-integration/java/cn/iocoder/yudao/framework/sms/core/client/impl/aliyun/AliyunSmsClientIntegrationTest.java b/yudao-framework/yudao-spring-boot-starter-biz-sms/src/test-integration/java/cn/iocoder/yudao/framework/sms/core/client/impl/aliyun/AliyunSmsClientIntegrationTest.java deleted file mode 100644 index 36f9dec82..000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-sms/src/test-integration/java/cn/iocoder/yudao/framework/sms/core/client/impl/aliyun/AliyunSmsClientIntegrationTest.java +++ /dev/null @@ -1,55 +0,0 @@ -package cn.iocoder.yudao.framework.sms.core.client.impl.aliyun; - -import cn.iocoder.yudao.framework.common.core.KeyValue; -import cn.iocoder.yudao.framework.sms.core.client.SmsCommonResult; -import cn.iocoder.yudao.framework.sms.core.client.dto.SmsSendRespDTO; -import cn.iocoder.yudao.framework.sms.core.client.dto.SmsTemplateRespDTO; -import cn.iocoder.yudao.framework.sms.core.client.impl.aliyun.AliyunSmsClient; -import cn.iocoder.yudao.framework.sms.core.enums.SmsChannelEnum; -import cn.iocoder.yudao.framework.sms.core.property.SmsChannelProperties; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.List; - -/** - * {@link AliyunSmsClient} 的集成测试 - */ -public class AliyunSmsClientIntegrationTest { - - private static AliyunSmsClient smsClient; - - @BeforeAll - public static void before() { - // 创建配置类 - SmsChannelProperties properties = new SmsChannelProperties(); - properties.setId(1L); - properties.setSignature("Ballcat"); - properties.setCode(SmsChannelEnum.ALIYUN.getCode()); - properties.setApiKey(System.getenv("ALIYUN_ACCESS_KEY")); - properties.setApiSecret(System.getenv("ALIYUN_SECRET_KEY")); - // 创建客户端 - smsClient = new AliyunSmsClient(properties); - smsClient.init(); - } - - @Test - public void testSendSms() { - List> templateParams = new ArrayList<>(); - templateParams.add(new KeyValue<>("code", "1024")); -// templateParams.put("operation", "嘿嘿"); -// SmsResult result = smsClient.send(1L, "15601691399", "4372216", templateParams); - SmsCommonResult result = smsClient.sendSms(1L, "15601691399", - "SMS_207945135", templateParams); - System.out.println(result); - } - - @Test - public void testGetSmsTemplate() { - String apiTemplateId = "SMS_2079451351"; - SmsCommonResult result = smsClient.getSmsTemplate(apiTemplateId); - System.out.println(result); - } - -} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-sms/src/test-integration/java/cn/iocoder/yudao/framework/sms/core/client/impl/debug/DebugDingTalkSmsClientIntegrationTest.java b/yudao-framework/yudao-spring-boot-starter-biz-sms/src/test-integration/java/cn/iocoder/yudao/framework/sms/core/client/impl/debug/DebugDingTalkSmsClientIntegrationTest.java deleted file mode 100644 index 47de977cb..000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-sms/src/test-integration/java/cn/iocoder/yudao/framework/sms/core/client/impl/debug/DebugDingTalkSmsClientIntegrationTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package cn.iocoder.yudao.framework.sms.core.client.impl.debug; - -import cn.iocoder.yudao.framework.common.core.KeyValue; -import cn.iocoder.yudao.framework.sms.core.client.SmsCommonResult; -import cn.iocoder.yudao.framework.sms.core.client.dto.SmsSendRespDTO; -import cn.iocoder.yudao.framework.sms.core.client.impl.debug.DebugDingTalkSmsClient; -import cn.iocoder.yudao.framework.sms.core.enums.SmsChannelEnum; -import cn.iocoder.yudao.framework.sms.core.property.SmsChannelProperties; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.List; - -/** - * {@link DebugDingTalkSmsClient} 的集成测试 - */ -public class DebugDingTalkSmsClientIntegrationTest { - - private static DebugDingTalkSmsClient smsClient; - - @BeforeAll - public static void init() { - // 创建配置类 - SmsChannelProperties properties = new SmsChannelProperties(); - properties.setId(1L); - properties.setSignature("芋道"); - properties.setCode(SmsChannelEnum.DEBUG_DING_TALK.getCode()); - properties.setApiKey("696b5d8ead48071237e4aa5861ff08dbadb2b4ded1c688a7b7c9afc615579859"); - properties.setApiSecret("SEC5c4e5ff888bc8a9923ae47f59e7ccd30af1f14d93c55b4e2c9cb094e35aeed67"); - // 创建客户端 - smsClient = new DebugDingTalkSmsClient(properties); - smsClient.init(); - } - - @Test - public void testSendSms() { - List> templateParams = new ArrayList<>(); - templateParams.add(new KeyValue<>("code", "1024")); - templateParams.add(new KeyValue<>("operation", "嘿嘿")); -// SmsResult result = smsClient.send(1L, "15601691399", "4372216", templateParams); - SmsCommonResult result = smsClient.sendSms(1L, "15601691399", "4383920", templateParams); - System.out.println(result); - } - -}