Upgrade to JUnit Jupiter 5.4.0-RC2

This commit is contained in:
Stephane Nicoll 2019-02-07 10:53:31 +01:00
parent 1bd84fe0ce
commit 0628829cd3
4 changed files with 7 additions and 13 deletions

View File

@ -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()

View File

@ -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();
}

View File

@ -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();

View File

@ -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>