Search in sources :

Example 1 with FlagDescription

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>");
}
Also used : FlagDescription(com.android.tools.build.bundletool.commands.CommandHelp.FlagDescription) Test(org.junit.Test)

Example 2 with FlagDescription

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]");
}
Also used : FlagDescription(com.android.tools.build.bundletool.commands.CommandHelp.FlagDescription) Test(org.junit.Test)

Example 3 with FlagDescription

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.");
}
Also used : FlagDescription(com.android.tools.build.bundletool.commands.CommandHelp.FlagDescription) Test(org.junit.Test)

Example 4 with FlagDescription

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>]");
}
Also used : FlagDescription(com.android.tools.build.bundletool.commands.CommandHelp.FlagDescription) Test(org.junit.Test)

Example 5 with FlagDescription

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");
}
Also used : FlagDescription(com.android.tools.build.bundletool.commands.CommandHelp.FlagDescription) Test(org.junit.Test)

Aggregations

FlagDescription (com.android.tools.build.bundletool.commands.CommandHelp.FlagDescription)6 Test (org.junit.Test)6