Annotation Type ConfigurationFromMethod


  • @Documented
    @Target({ANNOTATION_TYPE,METHOD})
    @Retention(RUNTIME)
    @ConfigurationSource(de.rwth.swc.coffee4j.junit.engine.annotation.configuration.sequential.execution.configuration.MethodBasedConfigurationProvider.class)
    public @interface ConfigurationFromMethod
    This is a ConfigurationSource which provides access to values returned from a factory method of the class in which this annotation is declared or from static factory methods in external classes referenced by the fully qualified name (classname#methodname).

    Factory methods within the test class can either be static or not. If the method is not static, however, the declaring class must have a no-args constructor. In any case, factory methods must not declare any parameters.

    This is a more of less direct copy of org.junit.jupiter.params.provider.MethodSource from the junit-jupiter-params project.

    • Element Detail

      • value

        String value
        The name of the method from which a SequentialExecutionConfiguration can be loaded. Consequently, the method defined by the value must either return a SequentialExecutionConfiguration directly, or a SequentialExecutionConfiguration.Builder which can be build. The method should not require any parameters.

        There are four valid ways to specify the factory method which should be used: -annotated on the CombinatorialTest: -empty string: this is the default and looks for a factory method in the same class as the test method and with the same name as the test method. As a CombinatorialTest has at least one parameter, java will allow methods with the same name, but no parameters -the name of a method: The method needs to be in the same class as the test method -a fully qualified name in the format of classname#methodname from which the testModel is then loaded -annotate the method inside the CombinatorialTest directly. the name is then ignored.

        Returns:
        the name of the method in one of the three schemas explained above
        Default:
        ""