Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
9783b968
Commit
9783b968
authored
Feb 06, 2018
by
贷前—徐菲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单元测试
parent
cb7fd9c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
GeetestCaptchaServiceTest.java
src/test/java/service/GeetestCaptchaServiceTest.java
+3
-5
QuantgroupCaptchaServiceTest.java
src/test/java/service/QuantgroupCaptchaServiceTest.java
+3
-3
No files found.
src/test/java/
demo
/GeetestCaptchaServiceTest.java
→
src/test/java/
service
/GeetestCaptchaServiceTest.java
View file @
9783b968
package
demo
;
package
service
;
import
cn.quantgroup.xyqb.Bootstrap
;
import
cn.quantgroup.xyqb.Bootstrap
;
import
cn.quantgroup.xyqb.model.ClientType
;
import
cn.quantgroup.xyqb.model.ClientType
;
...
@@ -24,7 +24,7 @@ public class GeetestCaptchaServiceTest {
...
@@ -24,7 +24,7 @@ public class GeetestCaptchaServiceTest {
@Test
@Test
public
void
testFetchGeetestCaptcha
(){
public
void
testFetchGeetestCaptcha
(){
Assert
.
assertNot
Equals
(
null
,
geetestCaptchaService
.
fetchGeetestCaptcha
(
PasswordUtil
.
MD5
(
"18010043006"
),
"127.0.0.1"
,
ClientType
.
APP
));
Assert
.
assertNot
Null
(
geetestCaptchaService
.
fetchGeetestCaptcha
(
PasswordUtil
.
MD5
(
"18010043006"
),
"127.0.0.1"
,
ClientType
.
APP
));
}
}
...
@@ -33,8 +33,6 @@ public class GeetestCaptchaServiceTest {
...
@@ -33,8 +33,6 @@ public class GeetestCaptchaServiceTest {
String
challenge
=
"d6e965e06b187c0a01276834d2ff00e6"
;
String
challenge
=
"d6e965e06b187c0a01276834d2ff00e6"
;
String
validate
=
"validate"
;
String
validate
=
"validate"
;
String
seccode
=
"seccode"
;
String
seccode
=
"seccode"
;
Assert
.
assertEquals
(
true
,
Assert
.
assertTrue
(
geetestCaptchaService
.
validGeetestCaptcha
(
ClientType
.
APP
,
"127.0.0.1"
,
PasswordUtil
.
MD5
(
"18010043006"
),
challenge
,
validate
,
seccode
));
geetestCaptchaService
.
validGeetestCaptcha
(
ClientType
.
APP
,
"127.0.0.1"
,
PasswordUtil
.
MD5
(
"18010043006"
),
challenge
,
validate
,
seccode
));
}
}
}
}
src/test/java/
demo
/QuantgroupCaptchaServiceTest.java
→
src/test/java/
service
/QuantgroupCaptchaServiceTest.java
View file @
9783b968
package
demo
;
package
service
;
import
cn.quantgroup.xyqb.Bootstrap
;
import
cn.quantgroup.xyqb.Bootstrap
;
import
cn.quantgroup.xyqb.service.captcha.IQuantgroupCaptchaService
;
import
cn.quantgroup.xyqb.service.captcha.IQuantgroupCaptchaService
;
...
@@ -23,7 +23,7 @@ public class QuantgroupCaptchaServiceTest {
...
@@ -23,7 +23,7 @@ public class QuantgroupCaptchaServiceTest {
@Test
@Test
public
void
testFetchQuantgroupCaptcha
(){
public
void
testFetchQuantgroupCaptcha
(){
Locale
locale
=
Locale
.
US
;
Locale
locale
=
Locale
.
US
;
Assert
.
assert
Equals
(
null
,
quantgroupCaptchaService
.
fetchQuantgroupCaptcha
(
locale
));
Assert
.
assert
NotNull
(
quantgroupCaptchaService
.
fetchQuantgroupCaptcha
(
locale
));
}
}
...
@@ -31,7 +31,7 @@ public class QuantgroupCaptchaServiceTest {
...
@@ -31,7 +31,7 @@ public class QuantgroupCaptchaServiceTest {
public
void
testValidQuantgroupCaptcha
(){
public
void
testValidQuantgroupCaptcha
(){
String
captchaId
=
"captchaId"
;
String
captchaId
=
"captchaId"
;
String
captchaValue
=
"captchaValue"
;
String
captchaValue
=
"captchaValue"
;
Assert
.
assert
Equals
(
true
,
quantgroupCaptchaService
.
validQuantgroupCaptcha
(
captchaId
,
captchaValue
));
Assert
.
assert
True
(
quantgroupCaptchaService
.
validQuantgroupCaptcha
(
captchaId
,
captchaValue
));
}
}
}
}
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