5 instantiations of CommandParsingException
Microsoft.AspNetCore.Shared.Tests (5)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (5)
235throw new CommandParsingException(command, $"Unexpected value '{longOption[1]}' for option '{option.LongName}'"); 304throw new CommandParsingException(command, $"Unexpected value '{shortOption[1]}' for option '{option.LongName}'"); 323throw new CommandParsingException(command, $"Unexpected value '{arg}' for option '{option.LongName}'"); 375throw new CommandParsingException(command, $"Missing value for option '{option.LongName}'"); 585throw new CommandParsingException(command, $"Unrecognized {argTypeName} '{args[index]}'");
29 references to CommandParsingException
Microsoft.AspNetCore.Shared.Tests (29)
CommandLineApplicationTests.cs (29)
70var ex = Assert.Throws<CommandParsingException>(() => app.Execute("test", "one", "two", "three")); 111var ex = Assert.Throws<CommandParsingException>(() => app.Execute("test2", "one", "two", "three")); 203var ex = Assert.Throws<CommandParsingException>(() => app.Execute("test", "--first")); 261var exception = Assert.Throws<CommandParsingException>(() => app.Execute("test", unexpectedArg)); 433var exception = Assert.Throws<CommandParsingException>(() => app.Execute("test", unexpectedOption)); 643var exception = Assert.Throws<CommandParsingException>(() => app.Execute("test", unexpectedOption)); 676var exception = Assert.Throws<CommandParsingException>(() => app.Execute("test", unexpectedOption)); 711var exception = Assert.Throws<CommandParsingException>(() => app.Execute("k", unexpectedOption, "run")); 814Assert.Throws<CommandParsingException>(() => app.Execute("subcmd", "-b", "B")); 891Assert.Throws<CommandParsingException>(() => app.Execute("--nest2", "N2", "--nest1", "N1", "-g", "G")); 892Assert.Throws<CommandParsingException>(() => app.Execute("lvl1", "--nest2", "N2", "--nest1", "N1", "-g", "G")); 1117var exception = Assert.Throws<CommandParsingException>(() => app.Execute(inputOptions)); 1143var exception = Assert.Throws<CommandParsingException>(() => app.Execute(inputOption)); 1154var exception = Assert.Throws<CommandParsingException>(() => app.Execute(inputOption)); 1165var exception = Assert.Throws<CommandParsingException>(() => app.Execute(inputOption)); 1219var exception = Assert.Throws<CommandParsingException>(() => app.Execute("test", firstOption));