use of com.android.tools.build.bundletool.flags.ParsedFlags.UnknownFlagsException in project bundletool by google.
the class FlagParserTest method unknownFlag_throws.
@Test
public void unknownFlag_throws() throws Exception {
ParsedFlags fp = new FlagParser().parse("command", "--flagUnknown=value");
UnknownFlagsException e = assertThrows(UnknownFlagsException.class, () -> fp.checkNoUnknownFlags());
assertThat(e).hasMessageThat().contains("Unrecognized flags: --flagUnknown");
}
use of com.android.tools.build.bundletool.flags.ParsedFlags.UnknownFlagsException in project bundletool by google.
the class BuildSdkApksCommandTest method unknownFlag_throws.
@Test
public void unknownFlag_throws() {
UnknownFlagsException exception = assertThrows(UnknownFlagsException.class, () -> BuildSdkApksCommand.fromFlags(getDefaultFlagsWithAdditionalFlags("--unknownFlag=notSure")));
assertThat(exception).hasMessageThat().contains(String.format("Unrecognized flags: --%s", "unknownFlag"));
}
Aggregations