use of org.junit.jupiter.params.provider.ArgumentsProvider in project junit5 by junit-team.
the class ParameterizedTestExtensionTests method argumentsRethrowsOriginalExceptionFromProviderAsUncheckedException.
@Test
void argumentsRethrowsOriginalExceptionFromProviderAsUncheckedException() {
ArgumentsProvider failingProvider = (context) -> {
throw new FileNotFoundException("a message");
};
FileNotFoundException exception = assertThrows(FileNotFoundException.class, () -> arguments(failingProvider, null));
assertEquals("a message", exception.getMessage());
}
Aggregations