use of com.google.copybara.exception.CommandLineException in project copybara by google.
the class CommandEnvTest method testConfigParsingNoSourceRefButPassed.
@Test
public void testConfigParsingNoSourceRefButPassed() {
CommandEnv env = new CommandEnv(workdir, options, ImmutableList.of("foo/copy.bara.sky", "wf", "foo"));
CommandLineException e = assertThrows(CommandLineException.class, () -> env.parseConfigFileArgs(mock(CopybaraCmd.class), /*usesSourceRef=*/
false));
assertThat(e).hasMessageThat().contains("Too many arguments for subcommand");
}
Aggregations