@Test public void should_return_fr_keywords() { GherkinDialect dialect = GherkinDialectProvider.getDialect("fr"); assertThat(dialect.getLanguage()).isEqualTo("fr"); assertThat(dialect.getFeatureKeywords()).hasSize(1); assertThat(dialect.getFeatureKeywords().contains("Fonctionnalité")).isTrue(); assertThat(dialect.getBackgroundKeywords()).hasSize(1); assertThat(dialect.getBackgroundKeywords().contains("Contexte")).isTrue(); assertThat(dialect.getScenarioKeywords()).hasSize(1); assertThat(dialect.getScenarioKeywords().contains("Scénario")).isTrue(); assertThat(dialect.getScenarioOutlineKeywords()).hasSize(2); assertThat(dialect.getScenarioOutlineKeywords().contains("Plan du scénario")).isTrue(); assertThat(dialect.getScenarioOutlineKeywords().contains("Plan du Scénario")).isTrue(); assertThat(dialect.getExamplesKeywords()).hasSize(1); assertThat(dialect.getExamplesKeywords().contains("Exemples")).isTrue(); assertThat(dialect.getStepKeywords()).hasSize(24); assertThat(dialect.getStepKeywords().contains("* ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Soit ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Etant donné que ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Etant donné qu'")).isTrue(); assertThat(dialect.getStepKeywords().contains("Etant donné ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Etant donnés ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Etant donnée ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Etant données ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Étant donné que ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Étant donné qu'")).isTrue(); assertThat(dialect.getStepKeywords().contains("Étant donné ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Étant donnée ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Étant donnés ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Étant données ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Quand ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Lorsque ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Lorsqu'")).isTrue(); assertThat(dialect.getStepKeywords().contains("Alors ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Mais ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Mais que ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Mais qu'")).isTrue(); assertThat(dialect.getStepKeywords().contains("Et ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Et que ")).isTrue(); assertThat(dialect.getStepKeywords().contains("Et qu'")).isTrue(); assertThat(dialect.getGivenStepKeywords()).hasSize(13); assertThat(dialect.getGivenStepKeywords().contains("Soit ")).isTrue(); assertThat(dialect.getGivenStepKeywords().contains("Etant donné que ")).isTrue(); assertThat(dialect.getGivenStepKeywords().contains("Etant donné qu'")).isTrue(); assertThat(dialect.getGivenStepKeywords().contains("Etant donné ")).isTrue(); assertThat(dialect.getGivenStepKeywords().contains("Etant donnés ")).isTrue(); assertThat(dialect.getGivenStepKeywords().contains("Etant donnée ")).isTrue(); assertThat(dialect.getGivenStepKeywords().contains("Etant données ")).isTrue(); assertThat(dialect.getGivenStepKeywords().contains("Étant donné que ")).isTrue(); assertThat(dialect.getGivenStepKeywords().contains("Étant donné qu'")).isTrue(); assertThat(dialect.getGivenStepKeywords().contains("Étant donné ")).isTrue(); assertThat(dialect.getGivenStepKeywords().contains("Étant donnée ")).isTrue(); assertThat(dialect.getGivenStepKeywords().contains("Étant donnés ")).isTrue(); assertThat(dialect.getGivenStepKeywords().contains("Étant données ")).isTrue(); assertThat(dialect.getWhenStepKeywords()).hasSize(3); assertThat(dialect.getWhenStepKeywords().contains("Quand ")).isTrue(); assertThat(dialect.getWhenStepKeywords().contains("Lorsque ")).isTrue(); assertThat(dialect.getWhenStepKeywords().contains("Lorsqu'")).isTrue(); assertThat(dialect.getThenStepKeywords()).hasSize(1); assertThat(dialect.getThenStepKeywords().contains("Alors ")).isTrue(); assertThat(dialect.getButStepKeywords()).hasSize(3); assertThat(dialect.getButStepKeywords().contains("Mais ")).isTrue(); assertThat(dialect.getButStepKeywords().contains("Mais que ")).isTrue(); assertThat(dialect.getButStepKeywords().contains("Mais qu'")).isTrue(); assertThat(dialect.getAndStepKeywords()).hasSize(3); assertThat(dialect.getAndStepKeywords().contains("Et ")).isTrue(); assertThat(dialect.getAndStepKeywords().contains("Et que ")).isTrue(); assertThat(dialect.getAndStepKeywords().contains("Et qu'")).isTrue(); }
public static GherkinDialect getDialect(String language) { Map<String, List<String>> map = DIALECTS.get(language); if (map == null) { throw new IllegalStateException("Unsupported language: " + language); } return new GherkinDialect(language, map); }
GherkinDialectProvider { public static GherkinDialect getDialect(String language) { Map<String, List<String>> map = DIALECTS.get(language); if (map == null) { throw new IllegalStateException("Unsupported language: " + language); } return new GherkinDialect(language, map); } }
GherkinDialectProvider { public static GherkinDialect getDialect(String language) { Map<String, List<String>> map = DIALECTS.get(language); if (map == null) { throw new IllegalStateException("Unsupported language: " + language); } return new GherkinDialect(language, map); } private  GherkinDialectProvider(); }
GherkinDialectProvider { public static GherkinDialect getDialect(String language) { Map<String, List<String>> map = DIALECTS.get(language); if (map == null) { throw new IllegalStateException("Unsupported language: " + language); } return new GherkinDialect(language, map); } private  GherkinDialectProvider(); static GherkinDialect getDialect(String language); }
GherkinDialectProvider { public static GherkinDialect getDialect(String language) { Map<String, List<String>> map = DIALECTS.get(language); if (map == null) { throw new IllegalStateException("Unsupported language: " + language); } return new GherkinDialect(language, map); } private  GherkinDialectProvider(); static GherkinDialect getDialect(String language); static final Pattern LANGUAGE_DECLARATION_PATTERN; static final String DEFAULT_LANGUAGE; }