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); + } + +}