diff --git a/jjava/src/test/java/org/dflib/jjava/jupyter/kernel/KernelMagicIT.java b/jjava/src/test/java/org/dflib/jjava/jupyter/kernel/KernelMagicIT.java index 569f820..2bf71a6 100644 --- a/jjava/src/test/java/org/dflib/jjava/jupyter/kernel/KernelMagicIT.java +++ b/jjava/src/test/java/org/dflib/jjava/jupyter/kernel/KernelMagicIT.java @@ -8,7 +8,7 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; -public class KernelMagicIT extends ContainerizedKernelCase { +class KernelMagicIT extends ContainerizedKernelCase { @Test void jars() throws Exception { @@ -68,4 +68,18 @@ void load() throws Exception { assertThat(snippetResult.getStderr(), not(containsString("|"))); assertThat(snippetResult.getStdout(), containsString("pong!")); } + + @Test + void loadFromPOM() throws Exception { + String pom = CONTAINER_RESOURCES + "/test-pom.xml"; + String snippet = String.join("\n", + "%loadFromPOM " + pom, + "import jakarta.annotation.Nullable;", + "Nullable.class.getName()" + ); + Container.ExecResult snippetResult = executeInKernel(snippet); + + assertThat(snippetResult.getStderr(), not(containsString("|"))); + assertThat(snippetResult.getStdout(), containsString("jakarta.annotation.Nullable")); + } } diff --git a/jjava/src/test/resources/test-pom.xml b/jjava/src/test/resources/test-pom.xml new file mode 100644 index 0000000..8e72f59 --- /dev/null +++ b/jjava/src/test/resources/test-pom.xml @@ -0,0 +1,15 @@ + + 4.0.0 + + org.dflib.jjava + jjava-test + 1.0 + + + + jakarta.annotation + jakarta.annotation-api + 3.0.0 + + +