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
8ad78914
Commit
8ad78914
authored
Jan 04, 2018
by
技术部-任文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时提交,尝试解决多版本贮存代码混乱问题
parent
2ec9fc53
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
85 deletions
+38
-85
pom.xml
pom.xml
+6
-0
DemoApplicationTests.java
src/test/java/demo/DemoApplicationTests.java
+32
-55
FirstTest.java
src/test/java/demo/FirstTest.java
+0
-30
No files found.
pom.xml
View file @
8ad78914
...
...
@@ -99,6 +99,12 @@
<version>
${junit.jupiter.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.junit.jupiter
</groupId>
<artifactId>
junit-jupiter-params
</artifactId>
<version>
${junit.jupiter.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
...
...
src/test/java/demo/DemoApplicationTests.java
View file @
8ad78914
//package demo;
//
//import cn.quantgroup.xyqb.Bootstrap;
//import cn.quantgroup.xyqb.controller.internal.sms.SmsController;
//import cn.quantgroup.xyqb.controller.internal.user.UserController;
//import cn.quantgroup.xyqb.model.JsonResult;
//import org.junit.Assert;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//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;
//
//@RunWith(SpringJUnit4ClassRunner.class)
//@SpringBootTest(classes = Bootstrap.class)
//@WebAppConfiguration
//public class DemoApplicationTests {
//
// @Autowired
// private UserController userController;
//
// @Autowired
// private SmsController smsController;
//
// private String smsRegCode = "";
//
// @Test
// public void sendRegCode() {
// JsonResult jsonResult = smsController.sendRegistCode("18611428880", null);
// System.out.print(jsonResult.getMsg());
// Assert.assertEquals(jsonResult.getCode(), "0000");
// Assert.assertEquals(jsonResult.getBusinessCode(), "0000");
//
// }
//
// @Test
// public void registerFast() {
//// JsonResult jsonResult = userController.registerFast("18611428880", "000000", null, null, "");
//// Assert.assertEquals(jsonResult.getCode(), "0000");
// }
//
// @Test
// public void sendLoginCode() {
// JsonResult jsonResult = smsController.sendLoginCode("18611428880", null);
// Assert.assertEquals(jsonResult.getCode(), "0000");
// }
//
// @Test
// public void loginFast() {
//
// }
//
//
//}
package
demo
;
import
cn.quantgroup.xyqb.Bootstrap
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.jupiter.params.ParameterizedTest
;
import
org.junit.jupiter.params.provider.ValueSource
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
import
org.springframework.test.context.web.WebAppConfiguration
;
import
org.junit.Assert
;
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
Bootstrap
.
class
)
@WebAppConfiguration
public
class
DemoApplicationTests
{
@ParameterizedTest
@ValueSource
(
strings
=
{
"racecar"
,
"radar"
,
"able was I ere I saw elba"
})
void
palindromes
(
String
candidate
)
{
Assert
.
assertNotNull
(
candidate
);
}
@Ignore
(
"Not Ready to Run"
)
@Test
public
void
loginFast
()
{
}
}
src/test/java/demo/FirstTest.java
deleted
100644 → 0
View file @
2ec9fc53
/*
* Copyright 2015-2016 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution and is available at
*
* http://www.eclipse.org/legal/epl-v10.html
*/
package
demo
;
import
org.junit.jupiter.api.DisplayName
;
import
org.junit.jupiter.api.Tag
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.TestInfo
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertEquals
;
@Tag
(
"fast"
)
class
FirstTest
{
@Test
@DisplayName
(
"My 1st JUnit 5 test! 😎"
)
void
myFirstTest
(
TestInfo
testInfo
)
{
assertEquals
(
2
,
Math
.
addExact
(
1
,
1
),
"1 + 1 should equal 2"
);
assertEquals
(
"My 1st JUnit 5 test! 😎"
,
testInfo
.
getDisplayName
(),
()
->
"TestInfo is injected correctly"
);
}
}
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