use of com.android.tools.build.bundletool.commands.CommandHelp.FlagDescription in project bundletool by google.
the class CommandHelpTest method flagDescriptionPrintForSyntax_notOptional_withExampleValue.
@Test
public void flagDescriptionPrintForSyntax_notOptional_withExampleValue() {
FlagDescription flagDesc = FlagDescription.builder().setFlagName("foo").setExampleValue("bar").setDescription("This is foo.").build();
assertThat(flagDesc.getPrintForSyntax()).isEqualTo("--foo=<bar>");
}
use of com.android.tools.build.bundletool.commands.CommandHelp.FlagDescription in project bundletool by google.
the class CommandHelpTest method flagDescriptionPrintForSyntax_optional_noExampleValue.
@Test
public void flagDescriptionPrintForSyntax_optional_noExampleValue() {
FlagDescription flagDesc = FlagDescription.builder().setFlagName("foo").setOptional(true).setDescription("This is foo.").build();
assertThat(flagDesc.getPrintForSyntax()).isEqualTo("[--foo]");
}
use of com.android.tools.build.bundletool.commands.CommandHelp.FlagDescription in project bundletool by google.
the class CommandHelpTest method flagDescriptionPrintForDescription_optional.
@Test
public void flagDescriptionPrintForDescription_optional() {
FlagDescription flagDesc = FlagDescription.builder().setFlagName("foo").setOptional(true).setDescription("This is foo.").build();
assertThat(flagDesc.getPrintForDescription()).isEqualTo("--foo: (Optional) This is foo.");
}
use of com.android.tools.build.bundletool.commands.CommandHelp.FlagDescription in project bundletool by google.
the class CommandHelpTest method flagDescriptionPrintForSyntax_optional_withExampleValue.
@Test
public void flagDescriptionPrintForSyntax_optional_withExampleValue() {
FlagDescription flagDesc = FlagDescription.builder().setFlagName("foo").setExampleValue("bar").setOptional(true).setDescription("This is foo.").build();
assertThat(flagDesc.getPrintForSyntax()).isEqualTo("[--foo=<bar>]");
}
use of com.android.tools.build.bundletool.commands.CommandHelp.FlagDescription in project bundletool by google.
the class CommandHelpTest method flagDescriptionPrintForSyntax_notOptional_noExampleValue.
@Test
public void flagDescriptionPrintForSyntax_notOptional_noExampleValue() {
FlagDescription flagDesc = FlagDescription.builder().setFlagName("foo").setDescription("This is foo.").build();
assertThat(flagDesc.getPrintForSyntax()).isEqualTo("--foo");
}
Aggregations