From 71e7b5ed3dbf460a25dab697db241fc56c6c21c9 Mon Sep 17 00:00:00 2001 From: wenc000 <450292408@qq.com> Date: Tue, 20 Oct 2020 10:10:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B5=8B=E8=AF=95=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloud-manager-sms/pom.xml | 7 ++++ cloud-manager-sms/src/test/java/SmsTest.java | 36 ++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 cloud-manager-sms/src/test/java/SmsTest.java diff --git a/cloud-manager-sms/pom.xml b/cloud-manager-sms/pom.xml index 290396e..0b9ca5d 100644 --- a/cloud-manager-sms/pom.xml +++ b/cloud-manager-sms/pom.xml @@ -24,6 +24,13 @@ qcloudsms 1.0.6 + + + junit + junit + 4.12 + test + \ No newline at end of file diff --git a/cloud-manager-sms/src/test/java/SmsTest.java b/cloud-manager-sms/src/test/java/SmsTest.java new file mode 100644 index 0000000..6dfbacd --- /dev/null +++ b/cloud-manager-sms/src/test/java/SmsTest.java @@ -0,0 +1,36 @@ +import com.cm.manager.sms.config.properties.SmsDefaultProperties; +import com.cm.manager.sms.utils.DefaultSmsUtil; +import org.junit.Test; + +/** + * When you feel like quitting. Think about why you started + * 当你想要放弃的时候,想想当初你为何开始 + * + * @ClassName: SmsTest + * @Description: 短信测试 + * @Author: WangGeng + * @Date: 2020/10/20 9:39 + * @Version: 1.0 + **/ +public class SmsTest { + + @Test + public void test() { + // 包头政法 btzfw + // 西藏日喀则 xzrkz + String account = "xzrkz"; + String password = "xzrkz123"; + String phone = "15147146676"; + StringBuilder contentSB = new StringBuilder("【山西腾狮科技】").append("测试短信"); + String url = "https://dx.ipyy.net/sms.aspx?action=send&userid=&account={account}&password={password}&mobile={mobile}&content={content}&sendTime=&extno={extno}"; + String[] paramArray = new String[]{ + account, + password, + phone, + contentSB.toString(), + phone + }; + DefaultSmsUtil.sendSms(url, paramArray); + } + +}