Search in sources :

Example 1 with NullSource

use of org.junit.jupiter.params.provider.NullSource in project Gaffer by gchq.

the class AlwaysValidTrue method shouldReturnValidationResultForNullAndString.

@ParameterizedTest
@NullSource
@ValueSource(strings = { "test" })
public void shouldReturnValidationResultForNullAndString(String input) {
    final AlwaysValid<String> validator = new AlwaysValid<>();
    final ValidationResult result = validator.validateWithValidationResult(input);
    assertTrue(result.isValid());
}
Also used : ValidationResult(uk.gov.gchq.koryphe.ValidationResult) ValueSource(org.junit.jupiter.params.provider.ValueSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) NullSource(org.junit.jupiter.params.provider.NullSource)

Aggregations

ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 NullSource (org.junit.jupiter.params.provider.NullSource)1 ValueSource (org.junit.jupiter.params.provider.ValueSource)1 ValidationResult (uk.gov.gchq.koryphe.ValidationResult)1