Search in sources :

Example 1 with ParseException

use of com.datastax.oss.dsbulk.runner.cli.ParseException in project dsbulk by datastax.

the class DataStaxBulkLoaderTest method should_not_accept_parse_error.

@Test
void should_not_accept_parse_error() {
    ParseException error = catchThrowableOfType(() -> new CommandLineParser("load", "--codec.booleanStrings", "[a,b").parse(), ParseException.class);
    assertThat(error).hasMessageContaining("Invalid value for dsbulk.codec.booleanStrings, expecting LIST, got: '[a,b'").hasCauseInstanceOf(IllegalArgumentException.class);
    assertThat(error.getCause()).hasMessageContaining("h");
}
Also used : ParseException(com.datastax.oss.dsbulk.runner.cli.ParseException) CommandLineParser(com.datastax.oss.dsbulk.runner.cli.CommandLineParser) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

CommandLineParser (com.datastax.oss.dsbulk.runner.cli.CommandLineParser)1 ParseException (com.datastax.oss.dsbulk.runner.cli.ParseException)1 Test (org.junit.jupiter.api.Test)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1