mirror of
https://gitee.com/dcren/initializr.git
synced 2025-04-05 17:38:06 +08:00
Upgrade to JUnit Jupiter 5.4.0-RC2
This commit is contained in:
parent
1bd84fe0ce
commit
0628829cd3
@ -29,8 +29,7 @@ import io.spring.initializr.test.generator.PomAssert;
|
||||
import io.spring.initializr.test.generator.ProjectAssert;
|
||||
import io.spring.initializr.test.metadata.InitializrMetadataTestBuilder;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.jupiter.api.support.io.TempDirectory;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.mockito.ArgumentMatcher;
|
||||
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
@ -43,7 +42,6 @@ import static org.mockito.Mockito.verify;
|
||||
/**
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@ExtendWith(TempDirectory.class)
|
||||
public abstract class AbstractProjectGeneratorTests {
|
||||
|
||||
protected final ProjectGenerator projectGenerator;
|
||||
@ -60,7 +58,7 @@ public abstract class AbstractProjectGeneratorTests {
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
public void setup(@TempDirectory.TempDir Path folder) {
|
||||
public void setup(@TempDir Path folder) {
|
||||
Dependency web = Dependency.withId("web");
|
||||
web.getFacets().add("web");
|
||||
InitializrMetadata metadata = initializeTestMetadataBuilder()
|
||||
|
@ -42,8 +42,7 @@ import org.apache.tools.ant.taskdefs.Untar;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.jupiter.api.support.io.TempDirectory;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.skyscreamer.jsonassert.JSONAssert;
|
||||
import org.skyscreamer.jsonassert.JSONCompareMode;
|
||||
|
||||
@ -66,7 +65,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
/**
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@ExtendWith(TempDirectory.class)
|
||||
@SpringBootTest(classes = Config.class)
|
||||
public abstract class AbstractInitializrIntegrationTests {
|
||||
|
||||
@ -83,7 +81,7 @@ public abstract class AbstractInitializrIntegrationTests {
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
@BeforeEach
|
||||
public void before(@TempDirectory.TempDir Path folder) {
|
||||
public void before(@TempDir Path folder) {
|
||||
this.restTemplate = this.restTemplateBuilder.build();
|
||||
this.folder = folder.toFile();
|
||||
}
|
||||
|
@ -27,8 +27,7 @@ import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.Assumptions;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.jupiter.api.support.io.TempDirectory;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.openqa.selenium.JavascriptExecutor;
|
||||
import org.openqa.selenium.Keys;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
@ -47,7 +46,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Dave Syer
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@ExtendWith(TempDirectory.class)
|
||||
@ActiveProfiles("test-default")
|
||||
class ProjectGenerationSmokeTests extends AbstractFullStackInitializrIntegrationTests {
|
||||
|
||||
@ -58,7 +56,7 @@ class ProjectGenerationSmokeTests extends AbstractFullStackInitializrIntegration
|
||||
private Action enterAction;
|
||||
|
||||
@BeforeEach
|
||||
public void setup(@TempDirectory.TempDir Path folder) throws IOException {
|
||||
public void setup(@TempDir Path folder) throws IOException {
|
||||
Assumptions.assumeTrue(Boolean.getBoolean("smoke.test"),
|
||||
"Smoke tests disabled (set System property 'smoke.test')");
|
||||
this.downloadDir = folder.toFile();
|
||||
|
2
pom.xml
2
pom.xml
@ -41,7 +41,7 @@
|
||||
<java.version>1.8</java.version>
|
||||
<main.basedir>${basedir}</main.basedir>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<junit-jupiter.version>5.4.0-RC1</junit-jupiter.version>
|
||||
<junit-jupiter.version>5.4.0-RC2</junit-jupiter.version>
|
||||
<spring.boot.version>2.1.2.RELEASE</spring.boot.version>
|
||||
<spring-cloud-contract.version>2.0.0.RELEASE</spring-cloud-contract.version>
|
||||
<spring-javaformat.version>0.0.6</spring-javaformat.version>
|
||||
|
Loading…
Reference in New Issue
Block a user