Annotation Interface BlankSource


Parameterized test source that provides common blank string values.

This annotation is a composable replacement for using ArgumentsSource directly. When applied to a @ParameterizedTest method, it supplies a stream of blank strings covering the most common whitespace cases.

The following values are supplied:

  • "" - empty string
  • " " - single space
  • " " - multiple spaces
  • "\t" - tab character
  • "\n" - line feed / newline
  • "\r\n" - carriage return + line feed (CRLF)

Example usage:


 @ParameterizedTest
 @BlankSource
 void shouldRejectBlank(String input) {
     assertTrue(input.isBlank());
 }
 
Since:
1.0
See Also: