Skip to content

Commit

Permalink
build(test): enable using GenericContainer without JUnit4 around
Browse files Browse the repository at this point in the history
As a hack to work around testcontainers/testcontainers-java#970,
we add these fake, empty classes. Copied from Spring project.

See also: testcontainers/testcontainers-java#970
  • Loading branch information
poikilotherm committed Sep 20, 2023
1 parent ee88cfd commit 600d209
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/java/org/junit/rules/TestRule.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.junit.rules;

/**
* "Fake" class used as a replacement for Junit4-dependent classes.
* See more at: <a href="https://github.com/testcontainers/testcontainers-java/issues/970">
* GenericContainer run from Jupiter tests shouldn't require JUnit 4.x library on runtime classpath
* </a>.
*/
@SuppressWarnings("unused")
public interface TestRule {
}
11 changes: 11 additions & 0 deletions src/test/java/org/junit/runners/model/Statement.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.junit.runners.model;

/**
* "Fake" class used as a replacement for Junit4-dependent classes.
* See more at: <a href="https://github.com/testcontainers/testcontainers-java/issues/970">
* GenericContainer run from Jupiter tests shouldn't require JUnit 4.x library on runtime classpath
* </a>.
*/
@SuppressWarnings("unused")
public class Statement {
}

0 comments on commit 600d209

Please sign in to comment.