Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
3debeb03
Commit
3debeb03
authored
Oct 30, 2018
by
Junling Bu
Browse files
chore[litemall-core,litemall-wx-api]: 测试代码调整
parent
2aebc059
Changes
3
Hide whitespace changes
Inline
Side-by-side
litemall-
wx-api
/src/test/java/org/linlinjava/litemall/
wx
/ExpressTest.java
→
litemall-
core
/src/test/java/org/linlinjava/litemall/
core
/ExpressTest.java
View file @
3debeb03
package
org.linlinjava.litemall.
wx
;
package
org.linlinjava.litemall.
core
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
...
...
litemall-core/src/test/java/org/linlinjava/litemall/core/SmsTest.java
View file @
3debeb03
...
...
@@ -29,11 +29,11 @@ public class SmsTest {
private
NotifyService
notifyService
;
@Test
public
void
test
Single
()
{
public
void
test
Captcha
()
{
String
phone
=
"xxxxxxxxxxx"
;
// 这里的短信签名必须在短信管理平台内设置正确并且相符合
String
msg
=
"【xxx】你的验证码为:123456,请与2分钟内填写,如非本人操作,请忽略本短信。"
;
notifyService
.
notifySms
(
phone
,
ms
g
);
String
[]
params
=
new
String
[]
{
"123456"
};
notifyService
.
notifySms
Template
(
phone
,
NotifyType
.
CAPTCHA
,
para
ms
);
try
{
Thread
.
sleep
(
5000
);
...
...
@@ -43,11 +43,11 @@ public class SmsTest {
}
@Test
public
void
test
Captcha
()
{
public
void
test
PaySucceed
()
{
String
phone
=
"xxxxxxxxxxx"
;
String
[]
params
=
new
String
[]
{
"123456"
};
notifyService
.
notifySmsTemplate
(
phone
,
NotifyType
.
CAPTCHA
,
params
);
notifyService
.
notifySmsTemplate
(
phone
,
NotifyType
.
PAY_SUCCEED
,
params
);
try
{
Thread
.
sleep
(
5000
);
...
...
@@ -57,11 +57,11 @@ public class SmsTest {
}
@Test
public
void
test
PaySucceed
()
{
public
void
test
Ship
()
{
String
phone
=
"xxxxxxxxxxx"
;
String
[]
params
=
new
String
[]
{
"123456"
};
notifyService
.
notifySmsTemplate
(
phone
,
NotifyType
.
PAY_SUCCEED
,
params
);
notifyService
.
notifySmsTemplate
(
phone
,
NotifyType
.
SHIP
,
params
);
try
{
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
();
}
}
}
litemall-core/src/test/java/org/linlinjava/litemall/core/WxTemplateTest.java
deleted
100644 → 0
View file @
2aebc059
package
org.linlinjava.litemall.core
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.linlinjava.litemall.core.notify.NotifyService
;
import
org.linlinjava.litemall.core.notify.NotifyType
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.web.WebAppConfiguration
;
/**
*/
@WebAppConfiguration
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringBootTest
public
class
WxTemplateTest
{
@Autowired
private
NotifyService
notifyService
;
@Test
public
void
testPaySucceed
()
{
String
touser
=
"xx"
;
String
[]
params
=
new
String
[]{
"xxx"
};
notifyService
.
notifyWxTemplate
(
touser
,
NotifyType
.
PAY_SUCCEED
,
params
);
try
{
Thread
.
sleep
(
5000
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment