Permalink
Browse files

Migrate first TemporaryFolder test using @EnableRuleMigrationSupport

  • Loading branch information...
schnatterer committed Apr 1, 2018
1 parent 0c26a78 commit 285a93f71b9494cc78cf922f6dea59ab4c4674d0
Showing with 17 additions and 4 deletions.
  1. +7 −4 core/src/test/java/info/schnatterer/colander/ColanderITCase.java
  2. +10 −0 pom.xml
@@ -26,24 +26,27 @@
import info.schnatterer.colander.test.ITCases;
import net.fortuna.ical4j.model.Property;
import org.junit.Rule;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.migrationsupport.rules.EnableRuleMigrationSupport;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.util.Optional;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.*;
/**
* Integration tests that tests colander end-to-end, from ics file to ics file.
*/
@EnableRuleMigrationSupport
public class ColanderITCase {
@Rule
public TemporaryFolder folder = new TemporaryFolder();
@Test
public void endToEnd() throws Exception {
void endToEnd() throws Exception {
String outputPath = folder.getRoot().toString() + "/out.ics";
String inputPath = ITCases.getFilePathTestIcs(folder);
Colander.toss(inputPath)
@@ -59,7 +62,7 @@ public void endToEnd() throws Exception {
.filter(Optional::of)
.rinse()
.toFile(outputPath);
assertTrue("Output not written", new File(outputPath).exists());
assertTrue(new File(outputPath).exists(), "Output not written");
ITCases.verifyParsedIcs(inputPath, outputPath);
}
}
View
10 pom.xml
@@ -100,6 +100,11 @@
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit5.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-migrationsupport</artifactId>
<version>${junit5.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
@@ -142,6 +147,11 @@
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-migrationsupport</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>

0 comments on commit 285a93f

Please sign in to comment.