Class MultiEnvTestFilter

  • All Implemented Interfaces:
    org.junit.platform.engine.Filter<org.junit.platform.engine.TestDescriptor>, org.junit.platform.launcher.PostDiscoveryFilter

    public class MultiEnvTestFilter
    extends java.lang.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.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.junit.platform.engine.FilterResult apply​(org.junit.platform.engine.TestDescriptor test)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.junit.platform.engine.Filter

        toPredicate
    • Constructor Detail

      • MultiEnvTestFilter

        public MultiEnvTestFilter()
    • Method Detail

      • apply

        public org.junit.platform.engine.FilterResult apply​(org.junit.platform.engine.TestDescriptor test)
        Specified by:
        apply in interface org.junit.platform.engine.Filter<org.junit.platform.engine.TestDescriptor>