Class JUnitFilterSupplier

  • All Implemented Interfaces:
    java.util.function.Supplier<org.junit.runner.manipulation.Filter>

    @Component("tapirJUnitFilterSupplier")
    public class JUnitFilterSupplier
    extends java.lang.Object
    implements java.util.function.Supplier<org.junit.runner.manipulation.Filter>
    Supplies a Filter. The filter is passed to TapirJUnitBootstrapper.filter(Filter) and is not present when the tapir application is bootstrapped. Therefore we need this Supplier in order to provide the filter instance lazily.
    Since:
    2.0.0
    Author:
    Oliver Libutzki <[email protected]>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.junit.runner.manipulation.Filter get()
      Returns the filter
      void set​(org.junit.runner.manipulation.Filter filter)
      Sets the filter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JUnitFilterSupplier

        public JUnitFilterSupplier()
    • Method Detail

      • set

        public void set​(org.junit.runner.manipulation.Filter filter)
        Sets the filter.
        Parameters:
        filter - the filter to use
        Throws:
        java.lang.NullPointerException - thrown if filter is null
      • get

        public org.junit.runner.manipulation.Filter get()
        Returns the filter
        Specified by:
        get in interface java.util.function.Supplier<org.junit.runner.manipulation.Filter>
        Returns:
        the filter
        Throws:
        java.lang.IllegalStateException - thrown if no filter is set