|
@@ -29,11 +29,11 @@ public class SmsTest {
|
|
|
private NotifyService notifyService;
|
|
private NotifyService notifyService;
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
- public void testSingle() {
|
|
|
|
|
|
|
+ public void testCaptcha() {
|
|
|
String phone = "xxxxxxxxxxx";
|
|
String phone = "xxxxxxxxxxx";
|
|
|
- // 这里的短信签名必须在短信管理平台内设置正确并且相符合
|
|
|
|
|
- String msg = "【xxx】你的验证码为:123456,请与2分钟内填写,如非本人操作,请忽略本短信。";
|
|
|
|
|
- notifyService.notifySms(phone, msg);
|
|
|
|
|
|
|
+ String[] params = new String[] {"123456"};
|
|
|
|
|
+
|
|
|
|
|
+ notifyService.notifySmsTemplate(phone, NotifyType.CAPTCHA, params);
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
Thread.sleep(5000);
|
|
Thread.sleep(5000);
|
|
@@ -43,11 +43,11 @@ public class SmsTest {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
- public void testCaptcha() {
|
|
|
|
|
|
|
+ public void testPaySucceed() {
|
|
|
String phone = "xxxxxxxxxxx";
|
|
String phone = "xxxxxxxxxxx";
|
|
|
String[] params = new String[] {"123456"};
|
|
String[] params = new String[] {"123456"};
|
|
|
|
|
|
|
|
- notifyService.notifySmsTemplate(phone, NotifyType.CAPTCHA, params);
|
|
|
|
|
|
|
+ notifyService.notifySmsTemplate(phone, NotifyType.PAY_SUCCEED, params);
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
Thread.sleep(5000);
|
|
Thread.sleep(5000);
|
|
@@ -57,11 +57,11 @@ public class SmsTest {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
- public void testPaySucceed() {
|
|
|
|
|
|
|
+ public void testShip() {
|
|
|
String phone = "xxxxxxxxxxx";
|
|
String phone = "xxxxxxxxxxx";
|
|
|
String[] params = new String[] {"123456"};
|
|
String[] params = new String[] {"123456"};
|
|
|
|
|
|
|
|
- notifyService.notifySmsTemplate(phone, NotifyType.PAY_SUCCEED, params);
|
|
|
|
|
|
|
+ notifyService.notifySmsTemplate(phone, NotifyType.SHIP, params);
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
Thread.sleep(5000);
|
|
Thread.sleep(5000);
|
|
@@ -70,4 +70,17 @@ public class SmsTest {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
|
|
+ public void testRefund() {
|
|
|
|
|
+ String phone = "xxxxxxxxxxx";
|
|
|
|
|
+ String[] params = new String[] {"123456"};
|
|
|
|
|
+
|
|
|
|
|
+ notifyService.notifySmsTemplate(phone, NotifyType.REFUND, params);
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ Thread.sleep(5000);
|
|
|
|
|
+ } catch (InterruptedException e) {
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|