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
5b1cbf3a
Commit
5b1cbf3a
authored
May 21, 2017
by
fsn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试完善
parent
34c62017
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
4 deletions
+32
-4
src/test/java/com/stylefeng/guns/base/BaseTest.java
+3
-2
src/test/java/com/stylefeng/guns/shiro/Base64Test.java
+27
-0
src/test/java/com/stylefeng/guns/system/DictTest.java
+1
-1
src/test/java/com/stylefeng/guns/template/TemplateGenerator.java
+1
-1
No files found.
src/test/java/com/stylefeng/guns/base/BaseTest.java
View file @
5b1cbf3a
package
com
.
stylefeng
.
guns
.
base
;
package
com
.
stylefeng
.
guns
.
base
;
import
com.stylefeng.guns.GunsApplication
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.
SpringBootConfiguration
;
import
org.springframework.boot.
test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringBoot
Configuration
@SpringBoot
Test
(
classes
=
GunsApplication
.
class
)
public
class
BaseTest
{
public
class
BaseTest
{
}
}
src/test/java/com/stylefeng/guns/shiro/Base64Test.java
0 → 100644
View file @
5b1cbf3a
package
com
.
stylefeng
.
guns
.
shiro
;
import
org.springframework.util.Base64Utils
;
import
java.io.UnsupportedEncodingException
;
import
java.util.Arrays
;
public
class
Base64Test
{
/**
* Shiro 记住密码采用的是AES加密,AES key length 需要是16位,该方法生成16位的key
*/
public
static
void
main
(
String
[]
args
)
{
String
keyStr
=
"guns"
;
byte
[]
keys
;
try
{
keys
=
keyStr
.
getBytes
(
"UTF-8"
);
System
.
out
.
println
(
Base64Utils
.
encodeToString
(
Arrays
.
copyOf
(
keys
,
16
)));
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
}
}
src/test/java/com/stylefeng/guns/system/DictTest.java
View file @
5b1cbf3a
...
@@ -19,7 +19,7 @@ public class DictTest extends BaseTest{
...
@@ -19,7 +19,7 @@ public class DictTest extends BaseTest{
@Test
@Test
public
void
addTest
()
{
public
void
addTest
()
{
dictService
.
addDict
(
"测试"
,
"1:冻结;2:jiedong;3:接触"
);
dictService
.
addDict
(
"测试
123123123
"
,
"1:冻结;2:jiedong;3:接触"
);
}
}
@Test
@Test
...
...
src/test/java/com/stylefeng/guns/template/TemplateGenerator.java
View file @
5b1cbf3a
...
@@ -7,7 +7,7 @@ import com.stylefeng.guns.core.template.engine.base.GunsTemplateEngine;
...
@@ -7,7 +7,7 @@ import com.stylefeng.guns.core.template.engine.base.GunsTemplateEngine;
import
java.io.IOException
;
import
java.io.IOException
;
/**
/**
*
客户端
*
测试Guns模板引擎
*
*
* @author fengshuonan
* @author fengshuonan
* @date 2017-05-09 20:27
* @date 2017-05-09 20:27
...
...
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