public class LineValidatorAggregatorTest extends Object
| Constructor and Description |
|---|
LineValidatorAggregatorTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
noValidators(String line) |
void |
nullValidators(String line) |
void |
setup() |
void |
shortCircuitIfNoValidators() |
void |
validateLine(String line,
String valid,
String willHaveAwful,
String willHaveBadString) |
@BeforeEach public void setup()
@DisplayName(value="Validate that")
@ParameterizedTest(name="Line \"{0}\" should be {1} and if invalid it {2} have first forbidden string error and {3} have second forbidden string error")
@CsvSource(value={"a;b;c, valid, will not, will not","empty, valid, will not, will not","null, valid, will not, will not","awful;b;c, invalid, will, will not","a;bad;c, invalid, will not, will","awful;bad;c, invalid, will, will"})
public void validateLine(String line,
String valid,
String willHaveAwful,
String willHaveBadString)
@DisplayName(value="Everything is valid with no validators.")
@ParameterizedTest(name="Line \"{0}\" is valid")
@ValueSource(strings={"a;b;c","awful;b;c","a;bad;c","awful;bad;c","empty","null"})
public void noValidators(String line)
@DisplayName(value="Everything is valid with null validators.")
@ParameterizedTest(name="Line \"{0}\" is valid")
@ValueSource(strings={"a;b;c","awful;b;c","a;bad;c","awful;bad;c","empty","null"})
public void nullValidators(String line)
@DisplayName(value="Short circuit if there are no validators present.")
@Test
public void shortCircuitIfNoValidators()
throws com.opencsv.exceptions.CsvValidationException
com.opencsv.exceptions.CsvValidationExceptionCopyright © 2005–2025. All rights reserved.