Validate our own tests work with JUnit5 and the vintage engine

Closes gh-14737

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
This commit is contained in:
Madhura Bhave
2018-12-05 13:56:29 -08:00
committed by Stephane Nicoll
parent d9f339a1b6
commit 1db1c8b03c
821 changed files with 2279 additions and 2787 deletions

View File

@@ -18,10 +18,10 @@ package sample.parent.consumer;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import sample.parent.SampleParentContextApplication;
import sample.parent.producer.ProducerApplication;
@@ -40,15 +40,12 @@ import static org.junit.Assert.fail;
* @author Dave Syer
* @author Andy Wilkinson
*/
public class SampleIntegrationParentApplicationTests {
@Rule
public final TemporaryFolder temp = new TemporaryFolder();
class SampleIntegrationParentApplicationTests {
@Test
public void testVanillaExchange() throws Exception {
File inputDir = new File(this.temp.getRoot(), "input");
File outputDir = new File(this.temp.getRoot(), "output");
void testVanillaExchange(@TempDir Path temp) throws Exception {
File inputDir = new File(temp.toFile(), "input");
File outputDir = new File(temp.toFile(), "output");
ConfigurableApplicationContext app = SpringApplication.run(
SampleParentContextApplication.class, "--service.input-dir=" + inputDir,
"--service.output-dir=" + outputDir);