vertx/src/test/java/eu/internetofus/common/vertx/AbstractMainTest.java
/**
   * Verify the options are localized.
   *
   * @param lang language to load the options.
   */
Verify the options are localized.
@param lang language to load the options.
Verify the options are localized . @param lang language to load the options .
@ParameterizedTest(name = "Should create options for locale {0}")
  @ValueSource(strings = { "en", "es", "ca" })
  public void shouldCreateOptionForLocale(final String lang) {
    final var locale = Locale.getDefault();
    try {
      final var newLocale = new Locale(lang);
      Locale.setDefault(newLocale);
      final var options = this.main.createOptions();
      assertThat(options.hasOption(AbstractMain.HELP_OPTION)).isTrue();
      assertThat(options.hasOption(AbstractMain.VERSION_OPTION)).isTrue();
      assertThat(options.hasOption(AbstractMain.CONF_DIR_OPTION)).isTrue();
      assertThat(options.hasOption(AbstractMain.PROPERTY_OPTION)).isTrue();
    } finally {
      Locale.setDefault(locale);
    }
  }
@ ParameterizedTest ( name = "Should create options for locale {0}" ) @ ValueSource ( strings = { "en" , "es" , "ca" } ) public void shouldCreateOptionForLocale ( final String lang ) { final var locale = Locale . getDefault ( ) ; try { final var newLocale = new Locale ( lang ) ; Locale . setDefault ( newLocale ) ; final var options = this . main . createOptions ( ) ; assertThat ( options . hasOption ( AbstractMain . HELP_OPTION ) ) . isTrue ( ) ; assertThat ( options . hasOption ( AbstractMain . VERSION_OPTION ) ) . isTrue ( ) ; assertThat ( options . hasOption ( AbstractMain . CONF_DIR_OPTION ) ) . isTrue ( ) ; assertThat ( options . hasOption ( AbstractMain . PROPERTY_OPTION ) ) . isTrue ( ) ; } finally { Locale . setDefault ( locale ) ; } }
Verify the options are localized.
Verify the options are localized .