Java Examples for org.junit.jupiter.params.provider.ArgumentsProvider

The following java examples will help you to understand the usage of org.junit.jupiter.params.provider.ArgumentsProvider. These source code samples are taken from different open source projects.

Example 1
Project: junit5-master  File: ParameterizedTestExtensionTests.java View source code
@Test
void argumentsRethrowsOriginalExceptionFromProviderAsUncheckedException() {
    ArgumentsProvider failingProvider = ( context) -> {
        throw new FileNotFoundException("a message");
    };
    FileNotFoundException exception = assertThrows(FileNotFoundException.class, () -> arguments(failingProvider, null));
    assertEquals("a message", exception.getMessage());
}