diff --git a/javatests/google/registry/tools/RegistryToolTest.java b/javatests/google/registry/tools/RegistryToolTest.java index f55cc70df..96b98b6fa 100644 --- a/javatests/google/registry/tools/RegistryToolTest.java +++ b/javatests/google/registry/tools/RegistryToolTest.java @@ -19,6 +19,7 @@ import static com.google.common.base.CaseFormat.UPPER_CAMEL; import static com.google.common.reflect.Reflection.getPackageName; import static com.google.common.truth.Truth.assertThat; +import com.beust.jcommander.Parameters; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; import com.google.common.reflect.ClassPath; @@ -76,6 +77,16 @@ public class RegistryToolTest { } } + @Test + public void test_commandMap_allCommandsHaveDescriptions() throws Exception { + for (Map.Entry> commandEntry : + RegistryTool.COMMAND_MAP.entrySet()) { + Parameters parameters = commandEntry.getValue().getAnnotation(Parameters.class); + assertThat(parameters).isNotNull(); + assertThat(parameters.commandDescription()).isNotEmpty(); + } + } + /** * Gets the set of all non-abstract classes implementing the {@link Command} interface (abstract * class and interface subtypes of Command aren't expected to have cli commands). Note that this