Class DisplayNameFormatter
- java.lang.Object
-
- de.rwth.swc.coffee4j.junit.engine.execution.DisplayNameFormatter
-
public class DisplayNameFormatter extends Object
Formats a display name using a name pattern and aCombination
. This class is more a less a copy oforg.junit.jupiter.params.ParameterizedTestNameFormatter
from the junit-jupiter-params project.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_NAME_PATTERN
The default name pattern: {combination}
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
format(String namePattern, Combination combination)
Formats the combination into a String using a defined name pattern.
-
-
-
Field Detail
-
DEFAULT_NAME_PATTERN
public static final String DEFAULT_NAME_PATTERN
The default name pattern: {combination}- See Also:
- Constant Field Values
-
-
Method Detail
-
format
public static String format(String namePattern, Combination combination)
Formats the combination into a String using a defined name pattern.Multiple placeholders are supported: -{index}: given the current invocation index of the test starting with 1 -{combination}: the complete
Combination
which is tested by the test -{PARAMETER_NAME}: the value of theParameter
with the given name in the currently testedCombination
- Parameters:
namePattern
- the name pattern to format withcombination
- the combination to format with- Returns:
- the formatted string
-
-