-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass the "plugin class path" from Gradle to the Test Engine, and load…
… the classes under the created PluginClassLoader
- Loading branch information
Showing
3 changed files
with
94 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
src/embulkTest/java/org/embulk/input/junit5example/TestExample1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
package org.embulk.input.junit5example; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import org.embulk.junit5.api.EmbulkPluginTest; | ||
|
||
public class TestExample1 { | ||
@EmbulkPluginTest | ||
public void testExample1_1() { | ||
assertEquals(0, 1 - 1); | ||
final ClassLoader classLoader = this.getClass().getClassLoader(); | ||
assertEquals("org.embulk.plugin.PluginClassLoader", classLoader.getClass().getName()); | ||
} | ||
|
||
@EmbulkPluginTest | ||
public void testExample1_2() { | ||
assertEquals(0, 1 - 1); | ||
final ClassLoader classLoader = this.getClass().getClassLoader(); | ||
assertTrue(classLoader instanceof org.embulk.plugin.PluginClassLoader); | ||
} | ||
} |