Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Data-王博
finance-api
Commits
333db2c6
Commit
333db2c6
authored
Feb 19, 2017
by
Data-王博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
湖北消金 - 测试接口
parent
daf402f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
SystemServiceTest.java
...va/cn/quantgroup/financial/service/SystemServiceTest.java
+51
-0
No files found.
src/test/java/cn/quantgroup/financial/service/SystemServiceTest.java
0 → 100644
View file @
333db2c6
package
cn
.
quantgroup
.
financial
.
service
;
import
cn.quantgroup.financial.BootStarter
;
import
cn.quantgroup.financial.model.MailInfo
;
import
cn.quantgroup.financial.service.sys.IMailService
;
import
com.alibaba.fastjson.JSON
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.test.context.ActiveProfiles
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.web.WebAppConfiguration
;
/**
* Created by WuKong on 2017/2/19.
*/
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
BootStarter
.
class
)
@WebAppConfiguration
@ActiveProfiles
(
"local"
)
public
class
SystemServiceTest
{
@Autowired
IMailService
mailService
;
private
Object
lock
=
new
Object
();
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
SystemServiceTest
.
class
);
@Test
public
void
testSendMailNotice
(){
MailInfo
mailInfo
=
new
MailInfo
();
mailService
.
saveMailInfo
(
mailInfo
);
synchronized
(
lock
)
{
try
{
lock
.
wait
();
}
catch
(
InterruptedException
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
}
}
}
@Test
public
void
testJSONMailInfo
(){
MailInfo
mailInfo
=
new
MailInfo
();
mailInfo
.
setMailtype
(
new
Integer
(
1
).
byteValue
());
mailInfo
.
setMail
(
"bo.wang@quantgroup.cn"
);
System
.
out
.
println
(
JSON
.
toJSONString
(
mailInfo
));
}
}
Write
Preview
Markdown
is supported
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