Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Migrate first TemporaryFolder test using @EnableRuleMigrationSupport
- Loading branch information
Showing
with
17 additions
and
4 deletions.
-
+7
−4
core/src/test/java/info/schnatterer/colander/ColanderITCase.java
-
+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); |
|
|
} |
|
|
} |
|
@@ -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> |
|
|