Commit 8ad78914 authored by 技术部-任文超's avatar 技术部-任文超

临时提交,尝试解决多版本贮存代码混乱问题

parent 2ec9fc53
...@@ -99,6 +99,12 @@ ...@@ -99,6 +99,12 @@
<version>${junit.jupiter.version}</version> <version>${junit.jupiter.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
......
//package demo; package demo;
//
//import cn.quantgroup.xyqb.Bootstrap; import cn.quantgroup.xyqb.Bootstrap;
//import cn.quantgroup.xyqb.controller.internal.sms.SmsController; import org.junit.Ignore;
//import cn.quantgroup.xyqb.controller.internal.user.UserController; import org.junit.Test;
//import cn.quantgroup.xyqb.model.JsonResult; import org.junit.jupiter.params.ParameterizedTest;
//import org.junit.Assert; import org.junit.jupiter.params.provider.ValueSource;
//import org.junit.Test; import org.junit.runner.RunWith;
//import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.junit4.SpringRunner;
//import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.web.WebAppConfiguration;
//import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
//import org.springframework.test.context.web.WebAppConfiguration; import org.junit.Assert;
//
//@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringRunner.class)
//@SpringBootTest(classes = Bootstrap.class) @SpringBootTest(classes = Bootstrap.class)
//@WebAppConfiguration @WebAppConfiguration
//public class DemoApplicationTests { public class DemoApplicationTests {
// @ParameterizedTest
// @Autowired @ValueSource(strings = { "racecar", "radar", "able was I ere I saw elba" })
// private UserController userController; void palindromes(String candidate) {
// Assert.assertNotNull(candidate);
// @Autowired }
// private SmsController smsController;
// @Ignore("Not Ready to Run")
// private String smsRegCode = ""; @Test
// public void loginFast() {
// @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() {
//
// }
//
//
//}
/*
* 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");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment