新增测试代码
This commit is contained in:
parent
75496131a6
commit
71e7b5ed3d
@ -24,6 +24,13 @@
|
||||
<artifactId>qcloudsms</artifactId>
|
||||
<version>1.0.6</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
36
cloud-manager-sms/src/test/java/SmsTest.java
Normal file
36
cloud-manager-sms/src/test/java/SmsTest.java
Normal file
@ -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);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user