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 aConfigurationSourcewhich 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
staticor not. If the method is notstatic, 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.MethodSourcefrom the junit-jupiter-params project.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description StringvalueThe name of the method from which aSequentialExecutionConfigurationcan be loaded.
-
-
-
Element Detail
-
value
String value
The name of the method from which aSequentialExecutionConfigurationcan be loaded. Consequently, the method defined by the value must either return aSequentialExecutionConfigurationdirectly, or aSequentialExecutionConfiguration.Builderwhich 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 aCombinatorialTesthas 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 theCombinatorialTestdirectly. the name is then ignored.- Returns:
- the name of the method in one of the three schemas explained above
- Default:
- ""
-
-