Package org.projectnessie.junit.engine
Class MultiEnvTestFilter
java.lang.Object
org.projectnessie.junit.engine.MultiEnvTestFilter
- All Implemented Interfaces:
org.junit.platform.engine.Filter<org.junit.platform.engine.TestDescriptor>,org.junit.platform.launcher.PostDiscoveryFilter
public class MultiEnvTestFilter
extends Object
implements org.junit.platform.launcher.PostDiscoveryFilter
This filter excludes multi-environment tests engines from the JUnit Jupiter Test Engine.
Background: MultiEnvTestEngine delegates test discovery to JUnit Jupiter to run each
test class against a certain Nessie environment. However, JUnit Jupiter itself also discovers the
same tests, yet those test instances would not have the expected Nessie services running during
execution. Those tests can be skipped, but with this filter it's nicer, because JUnit Jupiter
does not even attempt to run them. Therefore, the duplicate discoveries will not appear in IDEs
and build output - less user confusion.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.junit.platform.engine.FilterResultapply(org.junit.platform.engine.TestDescriptor test) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.junit.platform.engine.Filter
toPredicate
-
Constructor Details
-
MultiEnvTestFilter
public MultiEnvTestFilter()
-
-
Method Details
-
apply
public org.junit.platform.engine.FilterResult apply(org.junit.platform.engine.TestDescriptor test) - Specified by:
applyin interfaceorg.junit.platform.engine.Filter<org.junit.platform.engine.TestDescriptor>
-