Class ParameterCdiTestRule<T>

  • All Implemented Interfaces:
    org.junit.rules.MethodRule

    public class ParameterCdiTestRule<T>
    extends Object
    implements org.junit.rules.MethodRule
    Rule to make possible to run parameterized test cases with Arquillian runner. The Rule field defines the parameter values which will be taken by the field annotated with @ParameterCdiTest. Based on https://gist.github.com/poolik/8764414
    Author:
    alostale
    See Also:
    ParameterCdiTest
    • Constructor Detail

      • ParameterCdiTestRule

        public ParameterCdiTestRule​(List<T> params,
                                    Predicate<T> skipWhen)
        Creates a ParameterCdiTestRule with an skipping condition if needed
        Parameters:
        params - the list of parameters of the parameterized test
        skipWhen - a predicate that can be used to skip the execution of the test for a subset of parameters. When it returns true for a given parameter, then the execution will be skipped. If this argument is null, then no parameter is skipped.
    • Method Detail

      • apply

        public org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base,
                                                       org.junit.runners.model.FrameworkMethod method,
                                                       Object target)
        Specified by:
        apply in interface org.junit.rules.MethodRule