Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
2fae8e2d
Commit
2fae8e2d
authored
May 21, 2017
by
fsn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字典的测试完成
parent
f759fbae
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
src/test/java/com/stylefeng/guns/system/DictTest.java
+23
-3
No files found.
src/test/java/com/stylefeng/guns/system/DictTest.java
View file @
2fae8e2d
package
com
.
stylefeng
.
guns
.
system
;
import
com.stylefeng.guns.base.BaseTest
;
import
com.stylefeng.guns.modular.system.dao.DictDao
;
import
com.stylefeng.guns.modular.system.service.IDictService
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
/**
* 字典服务测试
...
...
@@ -12,18 +16,34 @@ import javax.annotation.Resource;
* @author fengshuonan
* @date 2017-04-27 17:05
*/
public
class
DictTest
extends
BaseTest
{
public
class
DictTest
extends
BaseTest
{
@Resource
IDictService
dictService
;
@Resource
DictDao
dictDao
;
@Test
public
void
addTest
()
{
dictService
.
addDict
(
"测试123123123"
,
"1:冻结;2:jiedong;3:接触"
);
String
dictName
=
"这是一个字典测试"
;
String
dictValues
=
"1:测试1;2:测试2"
;
dictService
.
addDict
(
dictName
,
dictValues
);
}
@Test
public
void
editTest
()
{
dictService
.
editDict
(
1
,
"测试"
,
""
);
dictService
.
editDict
(
16
,
"测试"
,
"1:测试1;2:测试2"
);
}
@Test
public
void
deleteTest
()
{
this
.
dictService
.
delteDict
(
16
);
}
@Test
public
void
listTest
()
{
List
<
Map
<
String
,
Object
>>
list
=
this
.
dictDao
.
list
(
"性别"
);
Assert
.
assertTrue
(
list
.
size
()
>
0
);
}
}
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